美文网首页技术干货React Native开发
React Error: Failed at the xxx@0

React Error: Failed at the xxx@0

作者: szhielelp | 来源:发表于2017-11-05 22:20 被阅读0次

原文发表自 szhshp的第三边境研究所 , 转载请注明

错误细节

npm ERR! Ubuntu 16.0.4
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.7.0
npm ERR! npm  v3.10.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! UpScore@0.6.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the UpScore@0.6.0 start script 'react-scripts start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the UpScore package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-scripts start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs UpScore
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls UpScore
npm ERR! There is likely additional logging output above.

Solution

应该就是react-scripts没有安装成global的

解决方式很简单:

  1. npm install -g npm@latest to update npm because it is sometimes buggy.
  2. rm -rf node_modules to remove the existing modules.
  3. npm install to re-install the project dependencies.

参考文献

相关文章

网友评论

    本文标题:React Error: Failed at the xxx@0

    本文链接:https://www.haomeiwen.com/subject/ahahmxtx.html