[英]React Js can't Run using npm start
I want to run my project, but npm start error -_-我想运行我的项目,但是 npm start 错误 -_-
npm ERR! errno 1
npm ERR! breednder-project@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the breednder-project@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! /home/aziz/.npm/_logs/2020-02-15T09_11_32_000Z-debug.log```
Did you try recovering your dependencies?您是否尝试恢复您的依赖项? run
npm install
运行
npm install
and make sure from Node and npm version at least npm more than 6 and node more than 10并确保从 Node 和 npm 版本至少 npm 超过 6 和 node 超过 10
npm -v
node -v
and finally, try to delete the node_modules and package-lock and do npm i
again最后,尝试删除 node_modules 和 package-lock 并再次执行
npm i
I had this issue before so I will share what my issue was:我之前遇到过这个问题,所以我将分享我的问题:
in package.json just verify the integrity of you start command.在 package.json 中只需验证启动命令的完整性。 Also try
npm run start
(add run to it)还可以尝试
npm run start
(向其中添加 run)
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Your project lacks the necessary dependency to back the "start": "react-scripts start" clause under your package.json.您的项目缺少必要的依赖来支持 package.json 下的“start”:“react-scripts start”子句。 To fix this error, just delete your node_modules folder and run npm install again.
要修复此错误,只需删除您的 node_modules 文件夹并再次运行 npm install。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.