欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

sh: react-scripts: command not found after running npm start

发布时间:2024/1/17 编程问答 44 豆豆
生活随笔 收集整理的这篇文章主要介绍了 sh: react-scripts: command not found after running npm start 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

今天遇到一堆bug,从早上10点到现在8成的时间都像是浪费了.....

https://stackoverflow.com/questions/40546231/sh-react-scripts-command-not-found-after-running-npm-start

react-scripts命令无法找到,简直莫名其妙。。。

网友建议是删掉modules重新npm

然而我重新npm后报错,因为node-sass4.5.3版本本来就有bug,需要开发者自己去下载某个文件。。。

好吧我先把node-sass单独拿掉,

然后又遇到

“unexpected end of JSON input”

这个err

https://stackoverflow.com/questions/27994327/golang-json-unmarshal-unexpected-end-of-json-input

但是json格式并没有错。。。

最后的方法是,将src、public、package.json、eslintrc、babelrc 文件copy到空文件中,重建一个项目

重新npm,项目正常。。。。

转载于:https://www.cnblogs.com/alan2kat/p/7754432.html

总结

以上是生活随笔为你收集整理的sh: react-scripts: command not found after running npm start的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。