0

====================================================================== When I try to install install socket.io, I encounter an error. Please see the cmd image and the log file.

enter image description here

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',
1 verbose cli   'socket.io' ]
2 info using npm@2.14.12
3 info using node@v4.2.6
4 verbose install initial load of C:\inetpub\wwwroot\Test_NodeJSSocketIO\package.json
5 verbose readDependencies loading dependencies from C:\inetpub\wwwroot\Test_NodeJSSocketIO\package.json
6 silly cache add args [ 'socket.io', null ]
7 verbose cache add spec socket.io
8 silly cache add parsed spec Result {
8 silly cache add   raw: 'socket.io',
8 silly cache add   scope: null,
8 silly cache add   name: 'socket.io',
8 silly cache add   rawSpec: '',
8 silly cache add   spec: 'latest',
8 silly cache add   type: 'tag' }
9 silly addNamed socket.io@latest
10 verbose addNamed "latest" is being treated as a dist-tag for socket.io
11 info addNameTag [ 'socket.io', 'latest' ]
12 silly mapToRegistry name socket.io
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/socket.io
16 verbose addNameTag registry:https://registry.npmjs.org/socket.io not in flight; fetching
17 verbose request uri https://registry.npmjs.org/socket.io
18 verbose request no auth needed
19 info attempt registry request try #1 at 16:55:55
20 verbose request id 4772f4039b89ce43
21 http request GET https://registry.npmjs.org/socket.io
22 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
23 info attempt registry request try #2 at 16:56:05
24 http request GET https://registry.npmjs.org/socket.io
25 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
26 info attempt registry request try #3 at 16:57:05
27 http request GET https://registry.npmjs.org/socket.io
28 verbose stack Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
28 verbose stack     at errnoException (dns.js:26:10)
28 verbose stack     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
29 verbose cwd C:\inetpub\wwwroot\Test_NodeJSSocketIO
30 error Windows_NT 6.1.7601
31 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io"
32 error node v4.2.6
33 error npm  v2.14.12
34 error code ENOTFOUND
35 error errno ENOTFOUND
36 error syscall getaddrinfo
37 error network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
37 error network This is most likely not a problem with npm itself
37 error network and is related to network connectivity.
37 error network In most cases you are behind a proxy or have bad network settings.
37 error network
37 error network If you are behind a proxy, please make sure that the
37 error network 'proxy' config is set properly.  See: 'npm help config'
38 verbose exit [ 1, true ]

I have tired the following ways, but with no luck.

 1. Run as administrator
 2. npm config set registry http://registry.npmjs.org/
 3. npm config set http_proxy=http://address:8080
 4. npm config get proxy -> null
 5. computer restarted.

Many thanks for help!

Yves
  • 43
  • 1
  • 7

2 Answers2

0

That's a standard DNS error. If ping registry.npmjs.org does not work, then nothing with work including npm.

Check your DNS settings.

Vasyl Boroviak
  • 5,959
  • 5
  • 51
  • 70
  • error msg: "Ping request could not find host registry.npmjs.org. Please check the name and try again." There are any DNS settings docs let me try? thanks very much! – Yves Feb 11 '16 at 03:49
0

DNS cannot be resolved, try to point to some public DNS, e.g. Google at 8.8.8.8. If you are on Linux then add this to your /etc/resolv.conf:

nameserver 8.8.8.8

If you are on Mac OS X then go to System Preferences -> Network -> Choose your connection -> Advanced -> DNS add 8.8.8.8 to the collection.

Here is how you do it on Windows: http://www.doxer.org/resolved-resolv-conf-windows-equivalent/

P.S okay you are using Windows just checked your image ;)

Yerken
  • 1,944
  • 1
  • 14
  • 18