2016-02-02 120 views
0

我試圖運行「故宮安裝是爲了我的家庭作業 - 其中有給我的的package.json文件已經但是我不斷收到以下錯誤:錯誤與NPM安裝 - 代碼ENOTFOUND

Ramons-MacBook-Pro-3:project4 sacrams14$ npm install 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No README data 
npm ERR! Darwin 14.0.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" 
npm ERR! node v4.2.6 
npm ERR! npm v2.14.12 
npm ERR! code ENOTFOUND 
npm ERR! errno ENOTFOUND 
npm ERR! syscall getaddrinfo 

npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:80 
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! Please include the following file with any support request: 
npm ERR!  /Users/sacrams14/Dropbox/CS 142/project4/npm-debug.log 

回答

0

這似乎確實存在您的互聯網連接問題。

  1. 請檢查互聯網連接(似乎工作,因爲你能寫在這裏;))。
  2. 檢查npm的當前版本和您安裝的版本。也許舊版本無法與服務器聯繫。
  3. 檢查您的防火牆是否允許npm與互聯網聯繫。