2017-02-13 58 views
0

安裝Express時Node.js中出現錯誤在Node.js中安裝Express

我附上了命令提示符的截圖。

我沒有得到這個錯誤是什麼。請讓我知道enter image description here這個錯誤說了什麼,以便我可以修復它。

+0

DNS沒有及時解決;再次嘗試並確認您可以在瀏覽器中連接到https://registry.npmjs.org/。 – Ryan

+0

@Ryan,我可以導航到registry.npmjs.org但還是我得到同樣的問題 – Ashish

回答

0

可能出現的問題:

  • 沒有互聯網連接
  • DNS解析錯誤配置
  • 代理設置需要

你可以試試下面的命令來縮小問題:

  • host registry.npmjs.org
  • ping registry.npmjs.org
  • curl http://registry.npmjs.org/
  • curl https://registry.npmjs.org/
+0

1.我有適當的互聯網連接 2.不知道如何檢查 是的,我是背後的代理,我已經設置使用 'npm config set http-proxy http://abc.def.com/ghi:8080' 仍然我得到相同的錯誤。 – Ashish

+1

@Ashish:端口號在主機之後,而不是路徑之一。 'HTTP://abc.def.com:8080/ghi' – Ryan