ENOTFOUND when running npm install

npm err! network this is a problem related to network connectivity.
how to fix npm err code enotfound
getaddrinfo enotfound
enotfound error while installing angular/cli
proxy error in npm install
npm proxy
enotfound 3128
npm wpad

I am trying to install dependencies for a project with this project.json file:

{
  "name": "Pizza",
  "version": "1.0.0",
  "description": "NIT Project",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "TheSmokingGnu",
  "license": "ISC",
  "dependencies": {
    "basil.js": "^0.4.3",
    "brfs": "^1.4.3",
    "ejs": "^2.4.1",
    "grunt": "^0.4.5",
    "grunt-browserify": "^4.0.1",
    "grunt-contrib-watch": "^0.6.1"
  }
}

I just cd into directory(or use webshtorm's console for that), and run npm install:

npm install
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.npmjs.org/ejs failed, reason: getaddrinfo ENOTFOUND ip ip:80
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 

I am using Windows 10 (installed just yesterday), with system firewall turned off. I did not have any intention to use proxys, my config list looks like that:

>npm config list
; cli configs
metrics-registry = "http://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.5.1 node/v8.9.1 win32 x64"

; userconfig C:\Users\taras\.npmrc
http-proxy = "http://username:password@ip:port"
https-proxy = "http://username:password@ip/:port"
registry = "http://registry.npmjs.org/"
strict-ssl = false

; builtin config undefined
prefix = "C:\\Users\\taras\\AppData\\Roaming\\npm"

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = D:\Downloads\JS-Pizza-master\JS-Pizza-master
; HOME = C:\Users\taras
; "npm config ls -l" to show all defaults.

Finally, my error log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install' ]
2 info using npm@5.5.1
3 info using node@v8.9.1
4 verbose npm-session 9d19f4920a39031f
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall Pizza@1.0.0
7 info lifecycle Pizza@1.0.0~preinstall: Pizza@1.0.0
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 silly install loadShrinkwrap
13 silly install loadAllDepsIntoIdealTree
14 silly fetchPackageMetaData error for grunt@^0.4.5 request to http://registry.npmjs.org/grunt failed, reason: getaddrinfo ENOTFOUND ip ip:80
15 silly fetchPackageMetaData error for ejs@^2.4.1 request to http://registry.npmjs.org/ejs failed, reason: getaddrinfo ENOTFOUND ip ip:80
16 silly fetchPackageMetaData error for brfs@^1.4.3 request to http://registry.npmjs.org/brfs failed, reason: getaddrinfo ENOTFOUND ip ip:80
17 silly fetchPackageMetaData error for basil.js@^0.4.3 request to http://registry.npmjs.org/basil.js failed, reason: getaddrinfo ENOTFOUND ip ip:80
18 silly fetchPackageMetaData error for grunt-contrib-watch@^0.6.1 request to http://registry.npmjs.org/grunt-contrib-watch failed, reason: getaddrinfo ENOTFOUND ip ip:80
19 silly fetchPackageMetaData error for grunt-browserify@^4.0.1 request to http://registry.npmjs.org/grunt-browserify failed, reason: getaddrinfo ENOTFOUND ip ip:80
20 silly fetchPackageMetaData error for basil.js@^0.4.3 request to http://registry.npmjs.org/basil.js failed, reason: getaddrinfo ENOTFOUND ip ip:80
21 silly fetchPackageMetaData error for brfs@^1.4.3 request to http://registry.npmjs.org/brfs failed, reason: getaddrinfo ENOTFOUND ip ip:80
22 silly fetchPackageMetaData error for ejs@^2.4.1 request to http://registry.npmjs.org/ejs failed, reason: getaddrinfo ENOTFOUND ip ip:80
23 silly fetchPackageMetaData error for grunt@^0.4.5 request to http://registry.npmjs.org/grunt failed, reason: getaddrinfo ENOTFOUND ip ip:80
24 silly fetchPackageMetaData error for grunt-browserify@^4.0.1 request to http://registry.npmjs.org/grunt-browserify failed, reason: getaddrinfo ENOTFOUND ip ip:80
25 silly fetchPackageMetaData error for grunt-contrib-watch@^0.6.1 request to http://registry.npmjs.org/grunt-contrib-watch failed, reason: getaddrinfo ENOTFOUND ip ip:80
26 verbose type system
27 verbose stack FetchError: request to http://registry.npmjs.org/basil.js failed, reason: getaddrinfo ENOTFOUND ip ip:80
27 verbose stack     at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\index.js:68:14)
27 verbose stack     at emitOne (events.js:116:13)
27 verbose stack     at ClientRequest.emit (events.js:211:7)
27 verbose stack     at Socket.socketErrorListener (_http_client.js:387:9)
27 verbose stack     at emitOne (events.js:116:13)
27 verbose stack     at Socket.emit (events.js:211:7)
27 verbose stack     at emitErrorNT (internal/streams/destroy.js:64:8)
27 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:138:11)
27 verbose stack     at process._tickCallback (internal/process/next_tick.js:180:9)
28 verbose cwd D:\Downloads\JS-Pizza-master\JS-Pizza-master
29 verbose Windows_NT 10.0.16299
30 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
31 verbose node v8.9.1
32 verbose npm  v5.5.1
33 error code ENOTFOUND
34 error errno ENOTFOUND
35 error network request to http://registry.npmjs.org/basil.js failed, reason: getaddrinfo ENOTFOUND ip ip:80
36 error network This is a problem related to network connectivity.
36 error network In most cases you are behind a proxy or have bad network settings.
36 error network
36 error network If you are behind a proxy, please make sure that the
36 error network 'proxy' config is set properly.  See: 'npm help config'
37 verbose exit [ 1, true ]

Your user config file looks like you have some sort of proxy configured:

; userconfig C:\Users\taras\.npmrc
http-proxy = "http://username:password@ip:port"
https-proxy = "http://username:password@ip/:port"
registry = "http://registry.npmjs.org/"
strict-ssl = false

If you don't intend to use a proxy, I'd remove the C:\Users\taras.npmrc and re-do npm install.

Update: As the config files is stored in the user directory, it will remain unchanged, when you e.g. update npm.

npm install fails with ENOTFOUND -- not behind a proxy · Issue , I'm opening this issue because: npm install is not working for my computer What's going wrong? npm install -g solium returns npm ERR! code ENOTFOUND npm ERR! A complete log of this run can be found in: npm ERR! However when I run npm install -g express, I get an ENOTFOUND. I've searched everywhere for a solution but have not found anything. This is the screen dump. It's driving me crazy and delaying a critical project. Please help! Thanks!


Maybe it's because the proxy do not stand for https. What I do is clear the proxy content of ~/.npmrc, or use

npm config delete proxy

npm ERR! network getaddrinfo ENOTFOUND · Issue #8151 · npm , If possible, run npm with at least one -d flag to increase the logging level. Also, could you please attach the results of running npm config get  I am having an ENOTFOUND issue installing npmbox on both mac and windows offline machines. I have followed the offline install directions. The connected machine is running npm 2.5 with npmbox 2.1.1 installed.


It may be issue with proxy also.

Try this:

npm config delete proxy
npm config --global delete proxy

How to resolve NPM proxy issue whilel running node JS application , But I am facing below proxy issue while running app. Hide Copy Code. npm install nodemon npm ERR! code ENOTFOUND npm ERR! errno  I tried to run the npm install. and I got: C:>npm install npm WARN enoent ENOENT: no such file or directory, open 'C:\package.json' npm WARN !invalid#1 No description npm WARN !invalid#1 No repository field. npm WARN !invalid#1 No README data npm WARN !invalid#1 No license field. npm ERR! Windows_NT 10.0.14393


Who can help with setting up a proxy for a node js?, When installing npm install create-react-app -g, an error occurs: Your environment failed, r eason: getaddrinfo ENOTFOUND xx.aa.bb.cc npm ERR! network This is a A complete log of this run can be found in: npm ERR! npm init -y with default package.json. This will not ask any details and just creates a package.json file with default values. You can later change or modify using any text editor


npm install ENOTFOUND error, Hi All,. When i try to set up and run the Cesium earth, i got a error as shown below. While trying to execute the command npm install in the  To publish and install packages to and from the public npm registry or your company’s npm Enterprise registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. We strongly recommend using a Node version manager to install Node.js and npm.


NPM install doesn't work from behind our proxy which requires , This is a problem running the Nodejs package manager (NPM) on npm ERR! network getaddrinfo ENOTFOUND npm ERR! network This is  Check npm’s proxy configuration. Check that it’s not a problem with a package you’re trying to install (e.g. invalid package.json). Many ENOENT / ENOTEMPTY errors in output. npm is written to use resources efficiently on install, and part of this is that it tries to do as many things concurrently as is practical.