节点 ./postinstall.js
135 个套餐正在寻找资金
运行npm fund
了解详情
发现 0 个漏洞
未提供模板。这可能是因为您使用的是过时版本的 create-react-app。 请注意,不再支持 create-react-app 的全局安装。 您可以通过在再次使用 create-react-app 之前运行 npm uninstall -g create-react-app 或 yarn global remove create-react-app 来解决此问题。
C:\Windows\System32\react-app> npm start npm 错误!缺少脚本:开始
npm 错误!可以在以下位置找到此运行的完整日志: npm 错误! C:\Users\ObiTech ict Solution\AppData\Roaming\npm-cache_logs\2021-04-05T21_07_44_609Z-debug.log
我在尝试启动新的 React 应用程序时遇到上述错误
答案 0 :(得分:0)
我的 package.json 缺少启动脚本
package.json 文件的内容如下:
{
"name": "reactapp",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3"
}
}