2017-01-22 14 views
1

私がsudo npm install -g protractorを実行すると、そのフォルダ/ファイルがないように見えます。問題を解決する方法を知っている人はいますか?どうもありがとうございます:)同じ問題を持つmac sudo npm install -g protractorエラー404

npm ERR! Darwin 15.6.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "protractor" 
npm ERR! node v6.9.2 
npm ERR! npm v3.10.9 
npm ERR! code E404 

npm ERR! 404 no such package available : @types/node 
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 install screenshot

+0

ノードをv7.4.0に更新し、npmを4.1.1に更新しました。同じエラーです。 '@ type/node'はnpmレジストリにありません – KATHERINE

答えて

0

一部の人々は、4.0.4にバージョンを下げるが助けたことがわかりました。 butsは頻繁に間違いのようです。まだクールな解決策ではありませんが、いくつかはうまくいくようです。

+0

他の方法がありますか?ありがとう:) – KATHERINE

1

これはノード6.9.2で再現可能です。私はノードのこのバージョンのnpmのエラーだと思う。

❯ nvm install 6.9.2                                 ⏎ 
Downloading https://nodejs.org/dist/v6.9.2/node-v6.9.2-darwin-x64.tar.xz... 
######################################################################## 100.0% 
WARNING: checksums are currently disabled for node.js v4.0 and later 
Now using node v6.9.2 (npm v3.10.9) 

❯ npm i - g @types/node 
npm ERR! addLocal Could not install /Users/cnishina/- 
npm ERR! Darwin 16.3.0 
npm ERR! argv "/Users/cnishina/.nvm/versions/node/v6.9.2/bin/node" "/Users/cnishina/.nvm/versions/node/v6.9.2/bin/npm" "i" "-" "g" "@types/node" 
npm ERR! node v6.9.2 
npm ERR! npm v3.10.9 
npm ERR! path /Users/cnishina/- 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall open 

npm ERR! enoent ENOENT: no such file or directory, open '/Users/cnishina/-' 
npm ERR! enoent ENOENT: no such file or directory, open '/Users/cnishina/-' 
npm ERR! enoent This is most likely not a problem with npm itself 
npm ERR! enoent and is related to npm not being able to find a file. 
npm ERR! enoent 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/cnishina/npm-debug.log 

は6.9.3をインストールした後、エラーが消える:

❯ nvm install 6.9.3 
Downloading https://nodejs.org/dist/v6.9.3/node-v6.9.3-darwin-x64.tar.xz... 
######################################################################## 100.0% 
WARNING: checksums are currently disabled for node.js v4.0 and later 
npm i -g @tNow using node v6.9.3 (npm v3.10.10) 


❯ npm i -g @types/node 
/Users/cnishina/.nvm/versions/node/v6.9.3/lib 
└── @types/[email protected] 

私もこの記事の時点で最新のノード6をインストールしましょう、それはノード6.9.4です。インストールを確認しました@types/nodeはノード6.9.4でも動作します。

+0

ありがとう。しかし、私は試して、npmを更新しましたが、同じエラーがありました:( – KATHERINE

+0

npmキャッシングレイヤーを使用していますか?artifactoryまたはnexusのように? – cnishina

+0

nope、Macでgenera npmを使用しています – KATHERINE

関連する問題