Languages

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

3 points
Asked by:
Hayley-Mooney
677

I've tried to start React project and I've got the following error:

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

How can I fix this?

2 answers
4 points
Answered by:
Hayley-Mooney
677

It looks like you don't have installed node packages.

Install them using:

1. continuous integration mode:

npm ci install

Notes:

  • ci option prevents against packages versions changing,
  • it can be used if package-lock.json file is available.

2.  normal installation mode:

npm install
0 comments Add comment
3 points
Answered by:
Hayley-Mooney
677

You can solve it by going through the following steps:

  1. Open the Terminal in the main directory of your React project (the folder containing src/, .gitignore, package.json, etc.),
  2. use npm install command.

The second option is that you are missing react-scripts in package.json file.

In this case you should use:

npm install react-scripts --save
0 comments Add comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join