2017-10-15 196 views
0

試圖與無法安裝使用NPM安裝-g反應母語-CLI

npm install -g react-native-cli 

導致此錯誤安裝react-native-cli

npm ERR! Darwin 16.7.0 
npm ERR! argv "/Users/kamleshtilwani/.nvm/versions/node/v8.6.0/bin/node" "/Users/kamleshtilwani/.nvm/versions/node/v8.6.0/bin/npm" "install" "-g" "react-native-cli" 
npm ERR! node v8.6.0 
npm ERR! npm v3.4.1 
npm ERR! code MODULE_NOT_FOUND 

npm ERR! Cannot find module 'internal/errors' 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 

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

NPM install error

回答

0

快速測試上我的Mac建議更新npm將爲您解決問題。

this question(也是在Mac上)的接受答案似乎也表明碰撞npm版本(在本例中爲5.4.2)將擺脫這個錯誤。我可以在我的Mac上使用npm 5.0.0安裝react-native-cli。我降級到npm 3.4.1,試圖再次安裝,並得到一個類似於你的錯誤,雖然我的咆哮大約internal/fs而不是internal/errors

祝你好運!