简体   繁体   English

npm start throws sh: react-scripts: command not found

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

相关问题 反应脚本:找不到命令(npm start) - react-scripts: command not found (npm start) 运行“npm run build”后“sh: 1: react-scripts: not found” - "sh: 1: react-scripts: not found" after running "npm run build" npm start reactjs,无法启动,react-scripts:找不到命令 - npm start reactjs, won't start, react-scripts: command not found 命令“npm start”中的问题在第四个 tic-tac-toe@0.1.0 启动脚本中失败。 npm ERR:反应脚本:未找到 - Problem in the command "npm start" Failed at the fourth-tic-tac-toe@0.1.0 start script. npm ERR! react-scripts: not found sh:react-scripts-start:找不到命令 - sh: react-scripts-start: command not found 反应脚本 3.4.0 的 npm start 问题 - npm start issues with react-scripts 3.4.0 create-react-app + npm start - 'react-scripts' 不被识别为内部或外部命令 - create-react-app + npm start - 'react-scripts' is not recognized as an internal or external command npm 启动失败:错误:启动:`react-scripts start` - npm start failing: Error: start: `react-scripts start` 尝试将 MERN 应用程序部署到 Now (zeit.co) 时出现“sh: react-scripts: command not found”错误 - Getting 'sh: react-scripts: command not found' error when trying to deploy MERN app to Now (zeit.co) sh: SET: 在 `npm start` 中找不到命令 - sh: SET: command not found in `npm start`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM