Reactjs 运行nodemon server.js时显示错误

Reactjs 运行nodemon server.js时显示错误,reactjs,nodemon,Reactjs,Nodemon,我已经使用这些命令安装了nodemon npm install nodemon npm安装成功 运行nodemon server.js后显示错误 'react-scripts' is not recognized as an internal or external command, operable program or batch file. [nodemon] app crashed - waiting for file changes before starting... 也许您可以

我已经使用这些命令安装了nodemon

npm install nodemon
npm安装成功

运行
nodemon server.js后显示错误

'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
[nodemon] app crashed - waiting for file changes before starting...

也许您可以尝试安装并保存react脚本依赖项,看看这是否解决了您的问题:

npm i -S react-scripts

希望这有帮助

您还有其他解决方案吗?当然,您的node_modules目录可能已损坏。你能试着把它取下来重新安装吗?这假设所有依赖项都列在package.json文件中。此外,请删除您的包-lock.jsonfile@PrabhudevVatnal这些步骤有助于解决您的问题吗?