繁体   English   中英

React Js 无法使用 npm start 运行

[英]React Js can't Run using npm start

我想运行我的项目,但是 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```

您是否尝试恢复您的依赖项? 运行npm install

并确保从 Node 和 npm 版本至少 npm 超过 6 和 node 超过 10

npm -v 
node -v

最后,尝试删除 node_modules 和 package-lock 并再次执行npm i

我之前遇到过这个问题,所以我将分享我的问题:

在 package.json 中只需验证启动命令的完整性。 还可以尝试npm run start (向其中添加 run)

"scripts": {
  "start": "react-scripts start",
  "build": "react-scripts build",
  "test": "react-scripts test",
  "eject": "react-scripts eject"
},

您的项目缺少必要的依赖来支持 package.json 下的“start”:“react-scripts start”子句。 要修复此错误,只需删除您的 node_modules 文件夹并再次运行 npm install。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM