错误的ERR! errno -5

时间:2017-05-01 12:12:28

标签: node.js npm react-native

嗨,当我尝试使用react native

的典型启动器命令时,我收到此错误
react-native init test

返回此错误

npm WARN react-native@0.44.0 requires a peer of react@16.0.0-alpha.6 but none was installed.
Setting up new React Native app in /Users/xxxx/ReactNativeProjects/gpss
Installing React...
gpss@0.0.1 /Users/xxxxx/ReactNativeProjects/gpss
└── react@16.0.0-alpha.6 

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

1 个答案:

答案 0 :(得分:0)

您可以卸载react-native,然后使用以下命令:

npm install react@reactversion --save

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

您也可以尝试将其重新安装为:

npm install react --save

或升级:

npm update react-native

最终清理缓存效果很好。希望这个答案将来解决用户的任何问题。