简体   繁体   English

react-scripts:在反应应用程序中找不到命令

[英]react-scripts: command not found in react app

Im running a react-app on localhost and this error popped out.我在 localhost 上运行 react-app 并弹出此错误。 I have installed the correct dependencies with npm install, but for a reason i don't know it doesn't find the command react-scripts.我已经使用 npm 安装了正确的依赖项,但由于某种原因,我不知道它没有找到命令 react-scripts。

控制台中显示的错误

Nice to meet you.很高兴见到你。

Please check your node version.请检查您的节点版本。 After setup your node.exe.设置完 node.exe 后。

And set the below contents to your package.json file.并将以下内容设置到您的 package.json 文件中。

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

Then please execute the command line.然后请执行命令行。 "npm start" “npm 开始”

Best regards.此致。

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

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