2017-07-20 30 views
0

每次嘗試安裝量角器(http://www.protractortest.org)時,都會出現錯誤。我使用下面的命令:npm install -g protractor安裝量角器 - Registry在https://registry.npmjs.org/@types%2fnode上爲GET返回404

這是錯誤我看到:

npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "insta 
ll" "-g" "protractor" 
npm ERR! node v6.11.1 
npm ERR! npm v3.10.10 
npm ERR! code E404 

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/@types%2fnode 
npm ERR! 404 
npm ERR! 404 '@types/node' is not in the npm registry. 
npm ERR! 404 You should bug the author to publish it (or use the name yourself!) 
npm ERR! 404 It was specified as a dependency of 'protractor' 
npm ERR! 404 
npm ERR! 404 Note that you can also install from a 
npm ERR! 404 tarball, folder, http url, or git url. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\protractor\npm-debug.log 

我試過直接安裝@類型/節點,但失敗同樣的錯誤。我試過直接(併成功)下載了Typescript,但似乎並不能滿足量角器的安裝。 我在這裏錯過了什麼?根據npm的說法,這個軟件包現在是不是可用(即斷開),它在3天前被更新了。 https://www.npmjs.com/package/@types/node

+0

這是不尋常的。當我瀏覽到https://registry.npmjs.org/@types%2fnode我的Chrome瀏覽器,我得到迴應,而不是404'{「_id」:「@類型/節點」,「_啓」:」 378-10c856ad75f410d40c03812afba9dc03「,」name「:」@ types/node「,」description「:」Node.js的TypeScript定義「,」dist-tags「:{」latest「:」8.0.14「,」ts2.0 「:」 7.0.29" , 「ts2.1」: 「7.0.29」, 「ts2.2」: 「8.0.14」, 「ts2.3」: 「8.0.14」, 「ts2.4」: 「8.0.14」, 「ts2.5」: 「8.0.14」}, 「版本」:{ 「4.0.15-α」:{ 「名稱」: 「@類型/節點」, 「版本」:「4.0 .15-alpha「,」description「:」Node.js v4.x的類型定義從... ... – cnishina

+0

我也看到了,我再次嘗試,這次它似乎工作。我試圖運行命令 '量角器conf.js' 我看到一個錯誤,「術語'量角器'不被識別爲cmdlet的名稱...」 最後,我試圖用紗線而不是npm。這一工作。 '紗全局加載protractor' –

+0

運行此命令在終端'NPM配置集@types:註冊表=「https://registry.npmjs.org/」'然後嘗試安裝量角器。 – Barney

回答

0

在我以前的公司中,我們使用的是帶有私人NPM回購的Nexus 2作爲選項。所有NPM流量通過的Nexus去了,但它無法處理@types因爲就是在支持英娜新版本/更新。它給出了同樣的錯誤。

您是否還在使用私人回購設置?

0

我在安裝本機腳本時遇到了同樣的問題。嘗試使用下面的命令:

  1. 組HTTP
  2. 集HTTP_PROXY =

這將幫助你。