我正在尝试启动我的React应用程序,我删除了package.json,node_modules和package-lock.json
我重新安装了它们,当我尝试运行npm start时出现错误
freduah@freduah:~/react-kempinski$ npm start
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! /home/freduah/.npm/_logs/2020-10-28T17_28_21_894Z-debug.log
freduah@freduah:~/react-kempinski$
错误很明显,但我不知道如何解决
如果您使用构建应用程序,create-react-app
请检查package.json
inscripts
部分中是否包含这些行。
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
尝试npm run start
代替
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句