Categories
JavaScript Answers

How to Fix the “‘react-scripts’ is not recognized as an internal or external command” Error?

Spread the love

Install the react-scripts NPM Package

One way to fix the “‘react-scripts’ is not recognized as an internal or external command” error is to install the react-scripts package.

To do this, we run:

npm install react-scripts --save

Reinstall all NPM Packages

Another way to fix this error is to reinstall all packages.

To do this, we run:

rm -rf node_modules && npm install

on Linux or macOS or:

rm /s /q node_modules && npm install

on Windows.

We can also run:

npm cache clean --force
npm rebuild
npm install

to reinstall all packages.

Reinstall npm audit fix

The npm audit fix command will install any packages that are missing in node_modules but it’s present in package.json .

Reinstall npm update

npm update will update any packages that are present in the project.

So we can run this to reinstall any packages that are missing.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *