I keep getting:
C:\AppData>npm start
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! C:\AppData\Roaming\npm-cache\_logs\2019-02-28T18_08_25_285Z-
debug.log
My package file is as follows:
{
"name": "first",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.8.3",
"react-dom": "^16.8.3",
"react-scripts": "2.1.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
"cover 99.5%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
I'm new to npm, and when I first downloaded it, I was able to start it up on my local server no problem.
I wanted to switch my browser up, and in doing so, suddenly npm start is having an issue.
I know there are other questions similar, but none of them alleviate my issue.
正如@Arfeo所说,只需调用npm run start
。
Where is your package.json
located?
If your answer is, for example, c:\\AppData\\Eugene\\react-app
you need to change directory (only once),
cd c:\AppData\Eugene\react-app
then run your npm commands
npm start
npm run build
, etc.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.