NPM 启动问题(React)
我刚刚尝试使用 npm start 查看我的旧应用程序,但它无法加载并不断出现错误。
Cannot find module 'C:\Users\Team Knowhow\development\Punk-API\node_modules\react-scripts\bin\react-scripts.js.
我尝试创建一个新的 React 应用程序,NPM start 工作正常,所以不知道我的旧 React 应用程序有什么问题以及为什么 NPM start 不起作用。
I have just tried to view an old application of mine using npm start but it wont load keep getting the error.
Cannot find module 'C:\Users\Team Knowhow\development\Punk-API\node_modules\react-scripts\bin\react-scripts.js.
I tried creating a new react app and NPM start works fine so have no idea what the issue is with my old react app and why NPM start does not work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否首先使用
npm install
安装了依赖项。如果已经完成,请尝试删除 node_modules 文件夹并再次安装依赖项。
Have you installed dependencies first using
npm install
.If done already, try removing node_modules folder and installing dependencies again.
确保您已安装所有依赖项,包括
react-scripts
!Make sure you have installed all dependencies including
react-scripts
!您必须确保您的应用程序正在使用的所有
依赖项
均以正确的方式在您的pacakage.json
文件中及其正确的版本中提及。如果看起来没问题,则运行或
此命令将下载
package.json
文件中提到的所有依赖项。You've to ensure that all the
dependencies
that your application is using is mentioned in the correct manner with their correct version in yourpacakage.json
file. And if that looks alright then runor
This command will download all the dependencies that are mentioned in your
package.json
file.