3
respostas

Comando npm install express não funciona

Comando submetido ==> npm install express@4.16.3 --save-exact

Erro: npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npmjs.org/express failed, reason: getaddrinfo ENOTFOUND proxy.company.com proxy.company.com:8080 npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. 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! A complete log of this run can be found in: npm ERR! C:\Users\f2078397\AppData\Roaming\npm-cache_logs\2018-12-14T12_31_58_202Z-debug.log

3 respostas

Oi claudio tudo certo ?

Provavelmente alguma proxy está bloqueando o npm

Na parte da instalção no windows, o instrutor mostra como resolver o problema:

https://cursos.alura.com.br/course/nodejs-fundamentos/task/47651

Obrigado pela ajuda, mas o problema persiste, mesmo após eu submeter os 3 comandos abaixo:

  1. npm set strict-ssl false
  2. npm config set proxy http://proxy.company.com:8080
  3. npm config set https-proxy http://proxy.company.com:8080

ERRO: C:\Users\f2078397\Desktop\casadocodigo>npm install express@4.16.3 --save-exact npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npmjs.org/express failed, reason: getaddrinfo ENOTFOUND proxy.company.com proxy.company.com:8080 npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. 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! A complete log of this run can be found in: npm ERR! C:\Users\f2078397\AppData\Roaming\npm-cache_logs\2018-12-14T13_20_59_873Z-debug.log

Pode ser alguma instabilidade do npm, tenta atualizar o npm e instalar novamente o express.

npm install -g npm

Ou se você está acessando da sua empresa, no lugar do proxy.company:8080 você coloca o endereço do seu proxy.