1

Until yesterday npm run start command worked for my react project. I am unsure if this could be the cause but I updated npm to 6.13.6 today.

There are no errors or vulnerabilities. This is affecting all my react projects. I tried a lot of solutions including removing and reinstalling the node packages. enter image description here

package.json includes the following scripts:

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"

A debug log for a different project shows this: enter image description here

  • What happens when you use `npm run start`? There must be some sort of output in the console. – djfdev Jan 16 '20 at 22:29
  • There is no output. It just goes to the next line right away for input after half a sec. – mothfly_dev Jan 16 '20 at 22:30
  • And what is the script that `npm start` is running? This is defined in package.json `scripts` section. – djfdev Jan 16 '20 at 22:32
  • I am not sure why my question is downvoted. This is something I am genuinely trying to solve for the past several hours. – mothfly_dev Jan 16 '20 at 22:48
  • I'm not sure what this would do, but considering you upgraded npm and this started happening ... maybe try reverting the npm upgrade and running again? – djfdev Jan 16 '20 at 23:38

2 Answers2

0

Did you check your package.json file has the following code?

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

seems weird to me, have you tried removing node modules and reinstalling? you can also try enabling npm to debug log, https://github.com/npm/cli

hashbytes
  • 769
  • 1
  • 8
  • 26