Solved! ‘react-scripts’ is not recognized as an internal or external command

I use two computers to develop my applications. Git and GitHub work just fine and I can exchange between them all the time.

Yesterday I started a new React app on my home computer. Everything was working good so I commited everything to GitHub and go to sleep.

Today I cloned the project on my work computer. Ran npm install and when I tried to run npm start I got this error:

'react-scripts' is not recognized as an internal or external command

I am using Windows 10 on both computers. Even stranger than this is that I have other projects on my work computer that the command npm start ran without any problems.

After searching the entire internet on how to solve this I found this on StackOverflow. I just added a new script in package.json so it looks like this:

  "scripts": {
    "start": "react-scripts start",
    "iub": "node_modules/.bin/react-scripts.cmd start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

IUB is my work computer.

Just run npm run iub and everything worked!

This error is related with my work computer. So this workaround should do the trick till I format it and reinstall everything.