Help needed for react.js npm start gives me missing script err - npm ERR!

I am a noob in react.js and now I want to see if the table that I have learnt to create will work.

I did npm start but it gives me

npm ERR! missing script: start

So, here’s what my script looks like now (it differs from the auto-generated one)
after I changed it following this SO URLadvice : reactjs - What exactly is the 'react-scripts start' command? - Stack Overflow

"scripts": {
  "start": "npm-run-all -p watch-css start-js",
  "build": "npm run build-css && react-scripts build",
  "watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive",
  "build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/",
  "start-js": "react-scripts start"

The original one looks like this, inside package.json
“script:” : {
“start”: “react-scripts start”,
“build”: “react-scripts build”,
“test”: “react-scripts test”,
“eject”: “react-scripts eject”
Hope someone can help me out…as my deadline to complete my task is by today…tks.


What are you working in? Your local machine, codepen, something else? In codepen, one has to add the react libraries in the settings but on your local machine you have to do that in your package.json file. If you would send us what’s in that package.json file we could have a look at it.
I’ve just looked up on the net how one is supposed to start up a react project and there are many ways and things are changing fast. So, what exactly have been all the steps you’ve taken so far? Have you also tried without working with start ? What exactly happens then ? (node yourscript.js)


What’s npm-run-all?

I got to resolved it. Basically, I need to ran from the right directory so I need to cd into the name of the app before I did npm run and it will work. But, now I got a bigger problem. I think I need to create another post to explain things.

1 Like

Go ahead, create this new post. Glad you got this problem fixed

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.