简体   繁体   中英

Start script missing error when running npm start, issue persists when changing scripts start value

Im getting this error

npm ERR! missing script: start

when I try to run 'npm start' for this new react project I'm working on. I've looked around for a solution and saw some folks found success when they did something like this in their package.json file.

"scripts": {
    "start": "node index.js"
}

I attempted replicating the above code but got the same error when I tried to run "npm start". Are there any other steps I can take to fix this error?

Default scripts for a react project in package.json:

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

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.

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