huangmingwei
新手
新手
  • 最后登录2021-06-09
  • 发帖数2
阅读:565回复:2

[react]react启动报错

楼主#
更多 发布于:2021-04-21 09:11
 7. Try running npm ls eslint in your project folder.
     This will tell you which other package (apart from the expected react-scripts) installed eslint.


If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.


P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!


npm ERR! code ELIFECYCLE
npm ERR! project01@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project01@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\huangmingwei\AppData\Roaming\npm-cache\_logs\2021-04-21T00_59_44_391Z-debug.log
Compiled successfully!


You can now view project01 in the browser.      


  Local:            http://localhost:3000        
  On Your Network:  http://172.17.6.249:3000    


Note that the development build is not optimized.
To create a production build, use yarn build.    





解决办法:
在根目录上加一个.env文件
文件里只有一句代码:SKIP_PREFLIGHT_CHECK=true
doubleyong
管理员
管理员
  • 最后登录2021-06-18
  • 发帖数1013
  • 最爱沙发
  • 喜欢达人
  • 原创写手
  • 社区居民
  • 忠实会员
沙发#
发布于:2021-06-02 16:16
给楼主点赞
知识需要管理,知识需要分享
huangmingwei
新手
新手
  • 最后登录2021-06-09
  • 发帖数2
板凳#
发布于:2021-04-21 09:12
大部分相同问题有效
游客


返回顶部

公众号

公众号