[英]npm start throws sh: react-scripts: command not found
When I rename a react project, then change its name in package.json and package-lock.json, but when I run npm start command, it throws me the following error: When I rename a react project, then change its name in package.json and package-lock.json, but when I run npm start command, it throws me the following error:
sh: react-scripts: command not found
I have found that usually that error is fixed by reinstalling node_modules folder.我发现通常通过重新安装 node_modules 文件夹来修复该错误。 But when I run npm install it throws me the following error:
但是当我运行 npm install 时,它会抛出以下错误:
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! sh: node-gyp-build: command not found
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/manuferreras/.npm/_logs/2022-01-26T13_27_13_876Z-debug.log
Is there a solution for this?有解决方案吗?
Check npm version with command "npm -v"?使用命令“npm -v”检查 npm 版本? You may need to reinstall npm
您可能需要重新安装 npm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.