1

I'm trying to start my react app I deleted my package.json, node_modules and package-lock.json

I installed them back and when i try running npm start I get the error

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$ 

The error is quite clear but yet i don't know how to fix it

2 Answers 2

2

If you build your app with create-react-app check if have these lines in your package.json in scripts section.

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

Try npm run start instead

Sign up to request clarification or add additional context in comments.

Comments

1

Check Your package.json file. In this file, You should see the scripts section. The correct scripts should be something like this.

  "scripts": {
    "start": "node scripts/start.js", // The way to your start.js script
    "build": "node scripts/build.js", // The way to your build.js script
    "test": "node scripts/test.js" // The way to your test.js script
  },

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.