2013-11-25 19 views
6

मैं NPM के माध्यम से विभिन्न मॉड्यूल स्थापित करने के लिए कोशिश कर रहा हूँ।NPM "त्रुटि नेटवर्क getaddrinfo ENOTFOUND"

c:\>npm install -g express 

लेकिन मैं त्रुटि संदेश निम्न हो रही है:

0 info it worked if it ends with ok 
1 verbose cli [ 'D:\\FH Kiel\\WS 13\\Advanced Javascript\\nodejs\\\\node.exe', 
1 verbose cli 'D:\\FH Kiel\\WS 13\\Advanced Javascript\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 
1 verbose cli 'install', 
1 verbose cli 'express' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose node symlink D:\FH Kiel\WS 13\Advanced Javascript\nodejs\\node.exe 
5 verbose cache add [ 'express', null ] 
6 verbose cache add name=undefined spec="express" args=["express",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: 'express', 
7 verbose parsed url path: 'express', 
7 verbose parsed url href: 'express' } 
8 silly lockFile f3c62de4-express express 
9 verbose lock express C:\Users\MW\AppData\Roaming\npm-cache\f3c62de4-express.lock 
10 silly lockFile f3c62de4-express express 
11 silly lockFile f3c62de4-express express 
12 verbose addNamed [ 'express', '' ] 
13 verbose addNamed [ null, '*' ] 
14 silly lockFile 64a534c1-express [email protected] 
15 verbose lock [email protected] C:\Users\MW\AppData\Roaming\npm-cache\64a534c1-express.lock 
16 silly addNameRange { name: 'express', range: '*', hasData: false } 
17 verbose url raw express 
18 verbose url resolving [ 'http://registry.npmjs.org/', './express' ] 
19 verbose url resolved http://registry.npmjs.org/express 
20 info trying registry request attempt 1 at 15:47:46 
21 http GET http://registry.npmjs.org/express 
22 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND 
23 info trying registry request attempt 2 at 15:47:59 
24 http GET http://registry.npmjs.org/express 
25 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND 
26 info trying registry request attempt 3 at 15:49:01 
27 http GET http://registry.npmjs.org/express 
28 silly lockFile 64a534c1-express [email protected] 
29 silly lockFile 64a534c1-express [email protected] 
30 error network getaddrinfo ENOTFOUND 
30 error network This is most likely not a problem with npm itself 
30 error network and is related to network connectivity. 
30 error network In most cases you are behind a proxy or have bad network settings. 
30 error network 
30 error network If you are behind a proxy, please make sure that the 
30 error network 'proxy' config is set properly. See: 'npm help config' 
31 error System Windows_NT 6.1.7601 
32 error command "D:\\FH Kiel\\WS 13\\Advanced Javascript\\nodejs\\\\node.exe" "D:\\FH Kiel\\WS 13\\Advanced Javascript\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express" 
33 error cwd D:\nodejs 
34 error node -v v0.10.22 
35 error npm -v 1.3.14 
36 error syscall getaddrinfo 
37 error code ENOTFOUND 
38 error errno ENOTFOUND 
39 verbose exit [ 1, true ] 

मैं निम्नलिखित समाधान की कोशिश की है:

npm config set proxy http://usr:[email protected]:port 

npm config set https-proxy http://usr:[email protected]:port 

npm config set registry http://registry.npmjs.org/ 

मैं फ़ायरवॉल निष्क्रिय कर दिया है और कोशिश की ... कुछ भी नहीं काम कर रहा है। .. कोई प्रॉक्सी सेटिंग नहीं है इसलिए यह काम करना चाहिए (और अन्य कंप्यूटरों में काम कर रहा है) ... मैंने बिना किसी समस्या के node.js स्थापित किया है।

Thanx।

अद्यतन:

# 
# For example: 
# 
#  102.54.94.97  rhino.acme.com   # source server 
#  38.25.63.10  x.acme.com    # x client host 

# localhost name resolution is handled within DNS itself. 
# 127.0.0.1  localhost 
# ::1    localhost 


127.0.0.1  localhost 
127.0.0.1  localhost 
127.0.0.1  localhost 

मैं भी इस समाधान अन्य पोस्ट में पाया की कोशिश की है:: यहाँ खिड़कियां मेजबान फ़ाइल है

npm install <packagename> --registry http://registry.npmjs.org/ 

काम नहीं किया था या तो :(

+0

मैं पूरी पोस्ट पढ़ने के लिए नहीं किया खेद है! –

+0

@alihaider नहीं ... मैंने इसे अन्य लैपटॉप के साथ आजमाया है और यह ठीक काम कर रहा है। –

+0

आप एक काम कंप्यूटर से कॉपी करने node_modules कोशिश करते हैं और देख सकते हैं कि अगर काम करता है - बस जिज्ञासु –

उत्तर

13

मैं इस के लिए किसी भी समाधान नहीं मिला लेकिन अंत में मैं अपने Windows फिर से स्थापित करने के लिए किया था। अब यह काम कर रहा है ...

+12

मुझे हंसी बनाने के लिए उपरोक्त – Aaron

0

मेरे मामले में समस्या https-प्रॉक्सी सेट कर रही थी लेकिन इसे कोई रास्ता नहीं मिला। अंत में मैं कमांड प्रॉम्प्ट में निम्नलिखित की कोशिश की

npm config edit 

यह विकल्प अर्द्ध कोलन के साथ टिप्पणी की की डिफ़ॉल्ट सूची के साथ .npmrc फाइल खोली। बस https-प्रॉक्सी से पहले कोलन को निकालना पड़ा और मेरी कंपनी से मुझे प्रदान किए गए एक में प्रवेश किया, संपादक में सहेजें और सब कुछ काम किया।

उम्मीद है कि यह मदद करता है।

संबंधित मुद्दे