繁体   English   中英

npm 错误:缺少脚本:“开始”

[英]npm ERR! missing scripts: "start"

我无法运行我的项目,它说:

christian@MacBook-Air-di-christian React-Fito-v1.0-01-November-2021 % npm 开始 npm 错误:缺少脚本? “开始” npm ERR,npm ERR:您的意思是其中之一:npm ERR。 npm star # 标记你最喜欢的包 npm ERR. npm stars # 查看标记为收藏的包 npm ERR! npm 错误! 要查看脚本列表,请运行:npm ERR! npm 运行 npm 错误! 可以在以下位置找到此运行的完整日志:..

我的 package.json 脚本是:

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

我的代码中有类似的错误。 我只是在错误的文件夹中。 您必须进入包含所有包的文件夹才能运行命令 npm start。

在 VS 代码中打开文件夹

在 VS 终端中,您可以键入以下代码:

cd fileName
npm start
file name@0.1.0 start
react-scripts start

暂无
暂无

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

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