我试图通过执行以下操作来更新我的create-react-app版本:
如果您之前已经通过npm在全球范围内安装了create-react-app 安装-g create-react-app,建议您卸载该软件包 使用npm uninstall -g create-react-app确保npx始终使用 最新版本。
但是现在,当我运行npm start时,我收到一条错误消息:
missing script: start
但是在我应用程序的package.json
中,我找到了启动脚本:
{
"name": "dropzone-montessori",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
有人知道发生了什么事吗?