2017-05-26 52 views
3

我試圖在Windows系統的node.js終端中使用命令create-react-native-app創建新的React Native應用程序。我得到以下終端錯誤:使用'create-react-native-app'時出錯

D:\project>create-react-native-app crna 
Creating a new React Native app in D:\project\crna. 

Installing packages. This might take a couple minutes. 
Installing react-native-scripts... 

npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Suppor 
t 
npm WARN deprecated @exponent/[email protected]: Please switch to @expo/spawn-as 
ync, the new name of this package. It's the same code with our new name. 
npm ERR! shasum check failed for C:\Users\ui-admin\AppData\Local\Temp\npm-3204-a 
eacedd1\registry.npmjs.org\_40exponent\ngrok\-\ngrok-2.2.7.tgz 
npm ERR! Expected: 37fe66f922b1003da2a78c66b7d4d3bc9313e423 
npm ERR! Actual: d134060eb730b880da06d5c040ca933f6a75b613 
npm ERR! From:  https://registry.npmjs.org/@exponent/ngrok/-/ngrok-2.2.7.tgz 

npm ERR! A complete log of this run can be found in: 
npm ERR!  C:\Users\ui-admin\AppData\Roaming\npm-cache\_logs\2017-05-26T09_36_ 
04_379Z-debug.log 
`npm install --save-dev --save-exact react-native-scripts` failed 

任何人遇到此錯誤或修復它?

回答

0

我得到了同樣的錯誤,儘管在RubyMine中,它提供了反應 - 本機不支持npm 5的響應。它說你可以恢復到npm 4,或隨意在這裏登錄一個問題:https://github.com/npm/npm/issues/16991

我認爲你最好的選擇是恢復並等待它!

+0

是啊! 不幸的是,創建React Native App並不適用於npm 5。他們 建議使用npm 4或紗線,直到解決一些錯誤。 – khalifathul