npm ERR! code ENOTFOUND How Can I fix it? - node.js

I met this problem when I use react.
In terminal
npx create-react-app myproject
Error message
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry/,npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND proxy.company.com
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! /Users/****/.npm/_logs/2022-12-01T16_39_36_991Z-debug-0.log
log file
26 verbose logfile logs-max:10 dir:/Users/****/.npm/_logs
27 verbose logfile /Users/****/.npm/_logs/2022-12-01T16_39_36_991Z-debug-0.log
28 timing npm:load:logFile Completed in 2ms
29 timing npm:load:timers Completed in 0ms
30 timing npm:load:configScope Completed in 0ms
31 timing npm:load Completed in 16ms
32 silly logfile start cleaning logs, removing 5 files
33 timing arborist:ctor Completed in 1ms
34 timing arborist:ctor Completed in 0ms
35 silly logfile done cleaning log files
36 timing command:exec Completed in 70053ms
37 verbose type system
38 verbose stack FetchError: request to https://registry/,npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND proxy.company.com
38 verbose stack at ClientRequest.<anonymous> (/opt/homebrew/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
38 verbose stack at ClientRequest.emit (node:events:513:28)
38 verbose stack at onerror (/opt/homebrew/lib/node_modules/npm/node_modules/agent-base/dist/src/index.js:117:21)
38 verbose stack at callbackError (/opt/homebrew/lib/node_modules/npm/node_modules/agent-base/dist/src/index.js:136:17)
Already I uninstall node, npm and reinstall it.
But it isn't success create-react-app.
My node version : 19.2.0
My npm version : 8.19.3
What happened in my computer .. 🙀

run this command
npm config set registry http://registry.npmjs.org/
need to use http not https

Related

Can't use npx create-react-app <APP> as it return ETIMEDOUT

I know I know, there are already a lot of topics like this one, but I need to give it a try because I can't find the answer.
So, I installed Node.js, following the advice, adding the path to an environment variable, downloading every package, and after that first shot, I got to see an ERR! code ETIMEDOUT error for the first time.
After that I started my search for a solution, which led me to do the following:
npm install create-react-app
npm config delete proxy
npm config delete https proxy
npm config delete http proxy
npm cache clean --force
npm install npm#latest -g
npm init react-app
npx create-react-app <app> -timeout=60000
npm config set registry http://registry.npmjs.org/
npm config rm https-proxy
npm config rm proxy
Not only did I spend a lot of time trying to find a solution online, I also used the Huggingface dataset to build an embedding model with GPT-3 to extract and retrieve useful information about coding in Node.js, just to find out why it's not working, and still, I don't have the answer.
And now I don't know what to do next.
here is log file:
0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm#8.19.3
2 info using node#v18.13.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:project Completed in 2ms
10 timing config:load:file:C:\Users\USERNAME\.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:C:\Users\USERNAME\AppData\Roaming\npm\etc\npmrc Completed in 0ms
13 timing config:load:global Completed in 1ms
14 timing config:load:validate Completed in 0ms
15 timing config:load:credentials Completed in 1ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 12ms
18 timing npm:load:configload Completed in 12ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm install npm#latest
22 verbose argv "install" "npm#latest" "--global"
23 timing npm:load:setTitle Completed in 0ms
24 timing config:load:flatten Completed in 3ms
25 timing npm:load:display Completed in 4ms
26 verbose logfile logs-max:10 dir:C:\Users\USERNAME\AppData\Local\npm-cache\_logs
27 verbose logfile C:\Users\USERNAME\AppData\Local\npm-cache\_logs\2023-01-30T11_25_07_524Z-debug-0.log
28 timing npm:load:logFile Completed in 6ms
29 timing npm:load:timers Completed in 0ms
30 timing npm:load:configScope Completed in 0ms
31 timing npm:load Completed in 23ms
32 silly logfile start cleaning logs, removing 2 files
33 silly logfile done cleaning log files
34 timing command:install Completed in 133203ms
35 verbose type system
36 verbose stack FetchError: request to http://registry.npmjs.org/npm failed, reason: connect ETIMEDOUT 2606:4700::6810:1423:80
36 verbose stack at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
36 verbose stack at ClientRequest.emit (node:events:513:28)
36 verbose stack at Socket.socketErrorListener (node:_http_client:496:9)
36 verbose stack at Socket.emit (node:events:525:35)
36 verbose stack at emitErrorNT (node:internal/streams/destroy:151:8)
36 verbose stack at emitErrorCloseNT (node:internal/streams/destroy:116:3)
36 verbose stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
37 verbose cwd C:\Users\USERNAME\Desktop\MY APP
38 verbose Windows_NT 10.0.19044
39 verbose node v18.13.0
40 verbose npm v8.19.3
41 error code ETIMEDOUT
42 error syscall connect
43 error errno ETIMEDOUT
44 error network request to http://registry.npmjs.org/npm failed, reason: connect ETIMEDOUT 2606:4700::6810:1423:80
45 error network This is a problem related to network connectivity.
45 error network In most cases you are behind a proxy or have bad network settings.
45 error network
45 error network If you are behind a proxy, please make sure that the
45 error network 'proxy' config is set properly. See: 'npm help config'
46 verbose exit 1
47 timing npm Completed in 133331ms
48 verbose code 1
49 error A complete log of this run can be found in:
WHAT WORKED : npm config set registry https://registry.npm.taobao.org
source :
https://www.programmersought.com/article/67016822875/
Facing issue when tried running npx create-react-app myapp
Best,
KL
Heading

Installing npm sharp module on Ubuntu failed

I faced issue while was trying to install sharp module on ubuntu server.
I tried to install it to my project folder but had no success there.
I had a guess that this might happen due to some conflicts with current modules. After that I tried to install it to the new folder with no modules in it, but result was the same.
The issue flow is next. I try to install sharp module, then it stuck in this state (I waited for around an hour and nothing changed).
(##################) â ¼ reify:sharp: timing reifyNode:node_modules/semver Completed in 145ms
After that I pressed ctrl+c and here is the error that I got
root#ubuntu-front:/var/tmp/tes# npm i sharp
npm ERR! path /var/tmp/tes/node_modules/sharp
npm ERR! command failed
npm ERR! signal SIGINT
npm ERR! command sh /tmp/install-4252fa98.sh
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.13.2/libvips-8.13.2-linux-x64.tar.br
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-10-12T12_56_38_692Z-debug-0.log
And here is output from the dump file
288 info run sharp#0.31.1 install node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
289 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 275ms
290 timing auditReport:getReport Completed in 278ms
291 silly audit report {}
292 timing auditReport:init Completed in 0ms
293 timing reify:audit Completed in 279ms
294 info run sharp#0.31.1 install { code: null, signal: 'SIGINT' }
295 timing reify:rollback:createSparse Completed in 34ms
296 timing reify:rollback:retireShallow Completed in 0ms
297 timing command:i Completed in 21196ms
298 verbose stack Error: command failed
298 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/lib/index.js:63:27)
298 verbose stack at ChildProcess.emit (node:events:513:28)
298 verbose stack at maybeClose (node:internal/child_process:1093:16)
298 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
299 verbose pkgid sharp#0.31.1
300 verbose cwd /var/tmp/tes
301 verbose Linux 5.15.0-48-generic
302 verbose node v16.17.0
303 verbose npm v8.15.0
304 error path /var/tmp/tes/node_modules/sharp
305 error command failed
306 error signal SIGINT
307 error command sh /tmp/install-4252fa98.sh
308 error sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.13.2/libvips-8.13.2-linux-x64.tar.br
309 verbose exit 1
310 timing npm Completed in 21266ms
311 verbose unfinished npm timer reify 1665579398761
312 verbose unfinished npm timer reify:build 1665579400052
313 verbose unfinished npm timer build 1665579400052
314 verbose unfinished npm timer build:deps 1665579400052
315 verbose unfinished npm timer build:run:install 1665579400057
316 verbose unfinished npm timer build:run:install:node_modules/sharp 1665579400057
317 verbose code 1
318 error A complete log of this run can be found in:
318 error /root/.npm/_logs/2022-10-12T12_56_38_692Z-debug-0.log
I found some similar issues in the Internet but all of them were slightly different and suggested solutions didn't help in my case.
Here are the versions
# node -v
v16.17.0
# npm -v
8.15.0
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

ENOTFOUND when running npm install

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.
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 install anything failes with ECONNRESET

I'm having a huge issue with npm not being able to install anything on a virtual machine in a data centre because I keep getting ECONNRESET fails.
I've tried the set registry from http to https and back again with no change and I can't even upgrade npm without it failing.
I've been at this for a day now and am getting no where, hence the request.
I'm ultimately trying to install a meteor app with mup if that makes any difference.
The output from the last attempt is
taralga-infolite% npm install npm#latest -g
npm ERR! network read ECONNRESET
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 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! System Linux 3.13.0-74-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "npm#latest" "-g"
npm ERR! cwd /home/pnunn
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! syscall read
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pnunn/npm-debug.log
npm ERR! not ok code 0
The log file is
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'npm#latest', '-g' ]
2 info using npm#1.4.28
3 info using node#v0.10.36
4 verbose node symlink /usr/bin/node
5 verbose cache add [ 'npm#latest', null ]
6 verbose cache add name=undefined spec="npm#latest" args=["npm#latest",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
7 verbose parsed url host: null,
7 verbose parsed url port: null,
7 verbose parsed url hostname: null,
7 verbose parsed url hash: null,
7 verbose parsed url search: null,
7 verbose parsed url query: null,
7 verbose parsed url pathname: 'npm#latest',
7 verbose parsed url path: 'npm#latest',
7 verbose parsed url href: 'npm#latest' }
8 verbose cache add name="npm" spec="latest" args=["npm","latest"]
9 verbose parsed url { protocol: null,
9 verbose parsed url slashes: null,
9 verbose parsed url auth: null,
9 verbose parsed url host: null,
9 verbose parsed url port: null,
9 verbose parsed url hostname: null,
9 verbose parsed url hash: null,
9 verbose parsed url search: null,
9 verbose parsed url query: null,
9 verbose parsed url pathname: 'latest',
9 verbose parsed url path: 'latest',
9 verbose parsed url href: 'latest' }
10 verbose addNamed [ 'npm', 'latest' ]
11 verbose addNamed [ null, null ]
12 silly lockFile 588f5fcc-npm-latest npm#latest
13 verbose lock npm#latest /home/pnunn/.npm/588f5fcc-npm-latest.lock
14 info addNameTag [ 'npm', 'latest' ]
15 verbose request where is /npm
16 verbose request registry http://registry.npmjs.org/
17 verbose request id 08cd751c52e5f075
18 verbose url raw /npm
19 verbose url resolving [ 'http://registry.npmjs.org/', './npm' ]
20 verbose url resolved http://registry.npmjs.org/npm
21 verbose request where is http://registry.npmjs.org/npm
22 info trying registry request attempt 1 at 13:51:28
23 http GET http://registry.npmjs.org/npm
24 info retry will retry, error on last attempt: Error: read ECONNRESET
25 info trying registry request attempt 2 at 13:51:38
26 http GET http://registry.npmjs.org/npm
27 info retry will retry, error on last attempt: Error: read ECONNRESET
28 info trying registry request attempt 3 at 13:52:38
29 http GET http://registry.npmjs.org/npm
30 silly lockFile 588f5fcc-npm-latest npm#latest
31 silly lockFile 588f5fcc-npm-latest npm#latest
32 error network read ECONNRESET
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 Linux 3.13.0-74-generic
34 error command "/usr/bin/node" "/usr/bin/npm" "install" "npm#latest" "-g"
35 error cwd /home/pnunn
36 error node -v v0.10.36
37 error npm -v 1.4.28
38 error syscall read
39 error code ECONNRESET
40 error errno ECONNRESET
41 verbose exit [ 1, true ]
I get basically the same thing if I try and npm install underscore or npm install server (which are the two current packages the mup install is failing on).
I've run a tracert (actually mtr) to registry.npmjs.org and am getting no packet loss at all.
Any suggestions on what else to try?
Ta
Peter.
Finally figured out a way to make this work.
Turns out the answer is two fold... firstly, update npm to the latest version. To do this on my system I had to do
sudo mv /usr/bin/npm /usr/bin/npm.old
sudo /usr/bin/npm.old install npm -g
Then change the registry to use the mirror and do this globally (it took me ages to work out I missed the -g flag in the configuration)
sudo npm config set registry https://skimdb.npmjs.com/registry -g
I also increased the number of retries to 10
sudo npm config set fetch-retries 10 -g
My /etc/npmrc file is now
registry=https://skimdb.npmjs.com/registry
fetch-retries=10
which is actually the easier way to set these on a linux system.
mup takes a while to deploy the sites, but at least it now works reliably. There is definitely a problem with the default npm registry. I used wget to download a number of the .tgz packages npm was having problems with and it would take up to 10 attempts to get a connection that was not immediately reset by the server. The mirror seems to be much more stable.

Running Grunt commands Windows 8

I am trying to install Grunt using
npm install -g grunt-cli
But am getting an error I do not know how to interpret, I am new to Grunt and web dev. I am certain I have a valid installation of npm and node.js.
If anyone could explain what the following npm-debug file means and/or what I should do to get a valid grunt installation, that would be extremely helpful.
I am installing Grunt because it is used to build Bootstrap.
Sorry to dump a big error log, I am not sure how much of it is meaningful.
11 verbose addNamed [ 'grunt-cli', '' ]
12 verbose addNamed [ null, '*' ]
13 silly lockFile d63f3d0b-grunt-cli grunt-cli#
14 verbose lock grunt-cli# C:\Users\Kelsey\AppData\Roaming\npm-cache\d63f3d0b-grunt-cli.lock
15 silly addNameRange { name: 'grunt-cli', range: '*', hasData: false }
16 verbose url raw grunt-cli
17 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-cli' ]
18 verbose url resolved https://registry.npmjs.org/grunt-cli
19 info trying registry request attempt 1 at 10:24:14
20 http GET https://registry.npmjs.org/grunt-cli
21 info retry will retry, error on last attempt: Error: getaddrinfo EAGAIN
22 info trying registry request attempt 2 at 10:24:24
23 http GET https://registry.npmjs.org/grunt-cli
24 info retry will retry, error on last attempt: Error: getaddrinfo EAGAIN
25 info trying registry request attempt 3 at 10:25:24
26 http GET https://registry.npmjs.org/grunt-cli
27 silly lockFile d63f3d0b-grunt-cli grunt-cli#
28 silly lockFile d63f3d0b-grunt-cli grunt-cli#
29 error Error: getaddrinfo EAGAIN
29 error at errnoException (dns.js:37:11)
29 error at Object.onanswer [as oncomplete] (dns.js:124:16)
30 error If you need help, you may report this *entire* log,
30 error including the npm and node versions, at:
30 error <http://github.com/npm/npm/issues>
31 error System Windows_NT 6.2.9200
32 error command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli"
33 error cwd c:\Users\Kelsey\Documents
34 error node -v v0.10.29
35 error npm -v 1.4.14
36 error syscall getaddrinfo
37 error code EAGAIN
38 error errno EAGAIN
39 verbose exit [ 1, true ]
It looks like the cmd/command shell is attempting to run grunt commands with insufficient permissions.
Start the cmd/command shell as administrator, then the problem should be resolved.

Resources