1
1
1alexandr2015-07-28 15:07:24
linux
1alexandr, 2015-07-28 15:07:24

Question about npm. What's wrong with network settings?

Hello, friends!
I had a terrible problem a few days ago, I can't install anything with npm. I got tired of figuring it out myself and started asking on the forums what could be the problem.
At first I was advised to install fresh nodejs and npm, I installed fresh ubuntu, checked whether bower was installed, everything was fine, after that I installed different software than I usually use in general. Then it was necessary to install gulp and then I broke off.
I created a topic , they answered me, they suggested that I had a problem with network settings. What could be wrong with them? I'm not so friendly with Linux so far to understand what to do, so I decided to ask this question.
This is the content of npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', '-g', 'gulp' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/bin/node
5 verbose install initial load of /home/user/npm/lib/package.json
6 verbose readDependencies loading dependencies from /home/user/npm/lib/package.json
7 silly cache add args [ 'gulp', null ]
8 verbose cache add spec gulp
9 silly cache add parsed spec { raw: 'gulp',
9 silly cache add   scope: null,
9 silly cache add   name: 'gulp',
9 silly cache add   rawSpec: '',
9 silly cache add   spec: '*',
9 silly cache add   type: 'range' }
10 silly addNamed [email protected]*
11 verbose addNamed "*" is a valid semver range for gulp
12 silly addNameRange { name: 'gulp', range: '*', hasData: false }
13 silly mapToRegistry name gulp
14 silly mapToRegistry using default registry
15 silly mapToRegistry registry http://registry.npmjs.org/
16 silly mapToRegistry uri http://registry.npmjs.org/gulp
17 verbose addNameRange registry:http://registry.npmjs.org/gulp not in flight; fetching
18 verbose request uri http://registry.npmjs.org/gulp
19 verbose request no auth needed
20 info attempt registry request try #1 at 08:09:02
21 verbose request id 3a204c1384740ad7
22 http request GET http://registry.npmjs.org/gulp
23 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND proxy.company.com
24 info attempt registry request try #2 at 08:09:12
25 http request GET http://registry.npmjs.org/gulp
26 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND proxy.company.com
27 info attempt registry request try #3 at 08:10:12
28 http request GET http://registry.npmjs.org/gulp
29 verbose stack Error: getaddrinfo ENOTFOUND proxy.company.com
29 verbose stack     at errnoException (dns.js:44:10)
29 verbose stack     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
30 verbose cwd /home/user
31 error Linux 3.13.0-58-generic
32 error argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "gulp"
33 error node v0.12.7
34 error npm  v2.11.3
35 error code ENOTFOUND
36 error errno ENOTFOUND
37 error syscall getaddrinfo
38 error network getaddrinfo ENOTFOUND proxy.company.com
38 error network This is most likely not a problem with npm itself
38 error network and is related to network connectivity.
38 error network In most cases you are behind a proxy or have bad network settings.
38 error network
38 error network If you are behind a proxy, please make sure that the
38 error network 'proxy' config is set properly.  See: 'npm help config'
39 verbose exit [ 1, true ]

npmconfig
[email protected]:~$ npm config list
; cli configs
user-agent = "npm/2.11.3 node/v0.12.7 linux x64"

; userconfig /home/user/.npmrc
http_proxy = "http://proxy.company.com:8080"
https-proxy = "http://proxy.company.com:8080/"
https_proxy = "http://proxy.company.com:8080"
prefix = "/home/user/npm"
proxy = "http://proxy.company.com:8080/"
registry = "http://registry.npmjs.org/"

; node bin location = /usr/bin/node
; cwd = /home/user
; HOME = /home/user
; 'npm config ls -l' to show all defaults.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question