[英]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.