Answer the question
In order to leave comments, you need to log in
How to deal with npm?
Problem with npm when installing eg: npm install node-sass
Stops at this: normalize tree sill install loadcurrenttree
OS: Ubuntu 16.04
node -v
v4.2.6
npm -v
3.10.8
Answer the question
In order to leave comments, you need to log in
Try this, it might help:
1) update node
2) install node globally
3) npm init
4) link ln -s /usr/bin/nodejs /usr/bin/node
Alexander + : Nikita Polevoy : SM :
I deleted the proxy.
npm config delete http-proxy
npm config delete https-proxy
npm config rm proxy
npm config rm https-proxy
set HTTP_PROXY=null
set HTTPS_PROXY=null
Error:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin /nodejs',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'cordova',
1 verbose cli 'ionic' ]
2 info using [email protected] 3.5.2
3 info using [email protected]
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData cordova
8 silly fetchPackageMetaData ionic
9 silly fetchNamedPackageData cordova
10 silly mapToRegistry name cordova
11 silly mapToRegistry using default registry
12 silly mapToRegistry registry https://your.registry.url/
13 silly mapToRegistry uri https://your .registry.url/cordova
14 verbose request uri https://your.registry.url/cordova
15 verbose request no auth needed
16 info attempt registry request try #1 at 12:18:18
17 verbose request id ed3b078ddd449fde
18 http request GET https://your.registry.url/cordova
19 silly fetchNamedPackageData ionic
20 silly mapToRegistry name ionic
21 silly mapToRegistry using default registry
22 silly mapToRegistry registry https://your.registry.url/
23 silly mapToRegistry uri https://your.registry.url/ionic
24 verbose request uri https://your. registry.url/ionic
25 verbose request no auth needed
26 info attempt registry request try #1 at 12:18:18
27 http request GET https://your.registry.url/ionic
28 info retry will retry, error on last attempt : Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80
29 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80
30 info attempt registry request try #2 at 12:18:28
31 http request GET https:// your.registry.url/cordova
32 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80
33 info attempt registry request try #2 at 12:18:28
34 http request GET https://your.registry.url/ionic
35 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80
36 info attempt registry request try #3 at 12:19:28
37 http request GET https://your.registry.url/cordova
38 silly fetchPackageMetaData Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80
38 silly fetchPackageMetaData at ClientRequest.onError (/usr/share/npm/ node_modules/request/node_modules/tunnel-agent/index.js:174:17)
38 silly fetchPackageMetaData at ClientRequest.g (events.js:260:16)
38 silly fetchPackageMetaData at emitOne (events.js:77:13)
38 silly fetchPackageMetaData at ClientRequest.emit (events.js:169:7)
38 silly fetchPackageMetaData at Socket.socketErrorListener (_http_client.js:258:9)
38 silly fetchPackageMetaData at emitOne (events.js:77:13)
38 silly fetchPackageMetaData at Socket.emit (events.js:169:7)
38 silly fetchPackageMetaData at connectErrorNT (net.js:998:8)
38 silly fetchPackageMetaData at nextTickCallbackWith2Args (node.js:441:9)
38 silly fetchPackageMetaData at process. _tickCallback (node.js:355:17)
38 silly fetchPackageMetaData error for cordova { [Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80] code: 'ECONNRESET' }
39 info attempt registry request try #3 at 12:19:28
40 http request GET https://your.registry.url/ionic
41 silly fetchPackageMetaData Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80
41 silly fetchPackageMetaData at ClientRequest.onError (/usr/share/npm/node_modules/request/node_modules/tunnel-agent/index.js:174:17)
41 silly fetchPackageMetaData at ClientRequest.g (events.js:260:16)
41 silly fetchPackageMetaData at emitOne (events.js:77:13)
41 silly fetchPackageMetaData at ClientRequest.emit (events.js:169:7)
41 silly fetchPackageMetaData at Socket.socketErrorListener (_http_client.js:258:9)
41 silly fetchPackageMetaData at emitOne (events.js:77:13)
41 silly fetchPackageMetaData at Socket.emit (events.js:169:7)
41 silly fetchPackageMetaData at connectErrorNT (net.js:998:8)
41 silly fetchPackageMetaData at nextTickCallbackWith2Args (node.js:441 :nine)
41 silly fetchPackageMetaData at process._tickCallback (node.js:355:17)
41 silly fetchPackageMetaData error for ionic { [Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80] code: 'ECONNRESET'
} rollbackFailedOptional Starting
43 silly rollbackFailedOptional Finishing
44 silly runTopLevelLifecycles Starting
45 silly runTopLevelLifecycles Finishing
46 silly install printInstalled
47 verbose stack Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80
47 verbose stack at ClientRequest.onError (/usr/share /npm/node_modules/request/node_modules/tunnel-agent/index.js:174:17)
47 verbose stack at ClientRequest.g (events.js:260:16)
47 verbose stack at emitOne (events.js:77:13)
47 verbose stack at ClientRequest.emit (events.js:169:7)
47 verbose stack at Socket.socketErrorListener (_http_client.js:258:9)
47 verbose stack at emitOne (events.js:77:13)
47 verbose stack at Socket.emit (events.js:169:7)
47 verbose stack at connectErrorNT (net. js:998:8)
47 verbose stack at nextTickCallbackWith2Args (node.js:441:9)
47 verbose stack at process._tickCallback (node.js:355:17)
48 verbose cwd /home/djabrail
49 error Linux 4.4.0- 38-generic
50 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "cordova" "ionic"
51 error node v4.2.6
52 error npm v3.5.2
53 error code ECONNRESET
54 error network tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy_host proxy_host:80
55 error network This is most likely not a problem with npm itself
55 error network and is related to network connectivity.
55 error network In most cases you are behind a proxy or have bad network settings.
55 error network
55 error network If you are behind a proxy, please make sure that the
55 error network 'proxy' config is set properly. See: 'npm help config'
56 verbose exit [ 1, true ]
How everything is started. The patient is more dead than alive...
sudo apt-get remove node npm
sudo apt-get purge node npm
sudo apt-get update && sudo apt-get upgrade
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question