简体   繁体   English

未找到命令 - npm 运行开始 - package.json

[英]Command Not Found - npm run start - package.json

In my package.json file, I have the following scripts:在我的 package.json 文件中,我有以下脚本:

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

When I use "npm run" it shows the following available scripts:当我使用“npm run”时,它会显示以下可用脚本:

 Lifecycle scripts included in swap@0.1.0: start react-scripts start test react-scripts test available via `npm run-script`: build react-scripts build eject react-scripts eject

However, whenever I use "npm run start" or "npm run-script start", I get the following error: sh: react-scripts: command not found但是,每当我使用“npm run start”或“npm run-script start”时,我都会收到以下错误: sh: react-scripts: command not found

Any ideas are appreciated;任何想法表示赞赏; I can't seem to find any clues.我似乎找不到任何线索。

im pretty new to this too, but you're supposed to run "npm start" to run your application.我对此也很陌生,但你应该运行“npm start”来运行你的应用程序。 remove the "run" part and try it out删除“运行”部分并尝试一下

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

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