2017-05-01 92 views
-1

你好我得到這個錯誤,當我嘗試典型啓動命令反應本土npm ERR!錯誤號-5

react-native init test 

返回該錯誤

npm WARN [email protected] requires a peer of [email protected] but none was installed. 
Setting up new React Native app in /Users/xxxx/ReactNativeProjects/gpss 
Installing React... 
[email protected] /Users/xxxxx/ReactNativeProjects/gpss 
└── [email protected] 

Installing Jest... 
npm ERR! code EIO 
npm ERR! errno -5 
npm ERR! syscall read 
npm ERR! EIO: i/o error, read 
+0

可能是0.44的問題。你有沒有嘗試過使用0.43? – MattyK14

+0

I/O錯誤可能指向硬件問題(HDD/SSD)。 – robertklep

+0

昨天它正在工作,我怎麼能降級到0.43,我記得昨天升級也許它 – sddsa

回答

0

你可以卸載react-native,然後用下面的命令:

npm install [email protected] --save

注意(reactversion)是你想要的版本。

你也可以只嘗試重新安裝它:

npm install react --save

或者與升級:

npm update react-native


最終清除緩存制定了罰款。希望這個答案可以解決將來任何用戶的問題。

+0

它安裝自動反應沒問題,但我怎麼能卸載? – sddsa

+0

'npm uninstall -g react' ???這就是你如何安裝它,只需要'卸載' –

+0

npm WARN [email protected]需要[email protected]的同伴,但沒有安裝。 建立新的陣營原生應用/用戶/ barron9/TEST3 安裝陣營... [email protected] /用戶/ barron9/TEST3 └──[email protected] 安裝玩笑。 .. ⸨░░░░░░░░░░░░░⸩⠴fetchMetadata:後添加/Users/barron9/.npm/has-flag/1.0.0/package/package.json後動詞 – sddsa

相關問題