Este é um problema ao executar o gerenciador de pacotes Nodejs (NPM) no Windows em uma rede executando o ActiveDirectory - e o problema parece estar por trás de um proxy corporativo.
Eu quero que o NPM INSTALL funcione ...
Temos um proxy que usa WPAD e autenticação.
Do Wpad.dat, obtive o FQDN e a porta do proxy (veja abaixo).
Eu usei
NPM CONFIG SET PROXY = http://<domain>%5C<username>:<passwordwith#>@ddcrpit311v1.corp.<company>.global:8080
para definir as informações do proxy (com nome de usuário e senha) e também
NPM CONFIG SET HTTPS-PROXY = <as above>
Eu configurei
NPM CONFIG SET registry = http://registry.npmjs.org/
para que eu não precise se preocupar com SSL e (apenas no caso)
NPM CONFIG SET strict-ssl = false
Ainda estou recebendo erros:
>npm install sax-js
npm http GET http://registry.npmjs.org/sax-js
npm http GET http://registry.npmjs.org/sax-js
npm http GET http://registry.npmjs.org/sax-js
npm ERR! network getaddrinfo ENOTFOUND
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Windows_NT 5.1.2600
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "sax-js"
npm ERR! cwd C:\Documents and Settings\morsli00
npm ERR! node -v v0.10.10
npm ERR! npm -v 1.2.25
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Documents and Settings\morsli00\npm-debug.log
npm ERR! not ok code 0
No registro, o seguinte parece importante:
20 verbose url resolving [ 'http://registry.npmjs.org/', './sax-js' ]
21 verbose url resolved http://registry.npmjs.org/sax-js
22 info trying registry request attempt 1 at 16:00:20
23 http GET http://registry.npmjs.org/sax-js
24 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
25 info trying registry request attempt 2 at 16:00:31
26 http GET http://registry.npmjs.org/sax-js
27 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
28 info trying registry request attempt 3 at 16:01:31
29 http GET http://registry.npmjs.org/sax-js
30 silly lockFile 4d5ae745-sax-js sax-js@
31 silly lockFile 4d5ae745-sax-js sax-js@
32 error network getaddrinfo ENOTFOUND
32 error network This is most likely not a problem with npm itself
32 error network and is related to network connectivity.
32 error network In most cases you are behind a proxy or have bad network settings.
32 error network
32 error network If you are behind a proxy, please make sure that the
32 error network 'proxy' config is set properly. See: 'npm help config'
33 error System Windows_NT 5.1.2600
34 error command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "sax-js"
35 error cwd C:\Documents and Settings\morsli00
36 error node -v v0.10.10
37 error npm -v 1.2.25
38 error syscall getaddrinfo
39 error code ENOTFOUND
40 error errno ENOTFOUND
41 verbose exit [ 1, true ]
Eu tentei sem o% 5C, assim como / \ todos com o mesmo resultado.
Eu tentei configurar o fiddler2 para funcionar como um proxy reverso, e eu configurei o endereço do proxy para localhost: 8888 e configurei o fiddler para conectar ao proxy - mas também me deparei com erros.
Existe um programa proxy simples que posso configurar como um proxy reverso que autenticará para mim? Há algo no Node para tentar?
Qualquer ideia é bem-vinda!