I am learning to react. The version I installed is 16. I installed prop-types via npm after I got an error that 'react-scripts' is not recognized as an internal or external command, operable program or batch file."
'react-scripts' is not recognized as an internal or external command, operable program or batch file
-
Are you using `create-react-app`? – Agney Feb 23 '18 at 06:57
-
run npm install if you are using create-react-app – Shubham Khatri Feb 23 '18 at 07:02
-
yes, i am using create-react-app, but it has been working till i installed prop-types – David Essien Feb 23 '18 at 07:04
-
make it available globally. npm install -g create-react-app – Javed Shaikh Feb 23 '18 at 07:07
-
that's exactly what I did and I have run npm install and it is still not working. Same error. The whole stuff was working till in installed prop-types. I have tried to uninstall it, still getting errors. – David Essien Feb 23 '18 at 07:12
-
3do one thing delete node_modules and package-lock.json file. and again npm install – Javed Shaikh Feb 23 '18 at 07:18
-
Possible duplicate of ['react-scripts' is not recognized as an internal or external command](https://stackoverflow.com/questions/47928735/react-scripts-is-not-recognized-as-an-internal-or-external-command) – cham Feb 12 '19 at 23:03
-
I'm going through a similar issue while trying to run this through my PyCharm terminal (Windows 10). I'm able to get react-scripts to run if I instead use PowerShell. – TheGRS May 26 '19 at 18:49
-
I Faced same issue , react-scripts is not recognized as an internal or external command, USE THIS COMMAND: npm i -g react-scripts – suresh narasimman Aug 06 '20 at 06:44
19 Answers
It is an error about react-scripts file missing in your node modules directory at the time of installation.
Now, you can add manually this via the command:
npm install react-scripts

- 4,287
- 1
- 18
- 17
I had the same issue, resolved by simply running following command in the project root folder -
npm install react-scripts --save

- 4,894
- 4
- 35
- 61
-
Installing react-scripts globally is not recommended by the CRA maintainers: https://github.com/facebook/create-react-app/issues/2436#issuecomment-306830791 – Tomáš Hübelbauer May 28 '19 at 07:51
-
-
1You have `react-scripts` `--save`d by default after you have used CRA. So you do not need to re-save it. If `npm install` (with or without deleting `node_modules`) doesn't fix the issue, the problem is likely with an old version of NPM or a problem with PATH which can be fixed as per my answer. – Tomáš Hübelbauer May 28 '19 at 13:02
If it doesn't get resolved even after running
npm install
OR
npm install react-scripts
Run:
node node_modules/react-scripts/scripts/start.js
Or use node js command-line tool and do npm install and npm start This solved the problem for me

- 91
- 1
- 2
-
Best answer, tried everything but could not get it working without directly starting – Yusuf Sep 27 '21 at 12:53
If none of the above solutions works and you have already installed the "react-scripts" package using
npm install react-scripts --save
You can try the below solution to run the application.
You should see the following in your package.json
file
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
}
The script : "start": "react-scripts start" is linked to the
file : nodemon node_modules/react-scripts/scripts/start.js
which is used to start the project in the development env
Try to start the project directly using the below commands:
node node_modules/react-scripts/scripts/start.js
or if you have nodemon installed then try
nodemon node_modules/react-scripts/scripts/start.js
Hope this helps :)

- 81
- 1
- 3
Simply remove node_modules folder and run npm install

- 392
- 4
- 4
-
it has broken everything! C:\Users\Xxxx>npm install internal/modules/cjs/loader.js:582 throw err; ^ Error: Cannot find module 'semver' – Giox Nov 29 '18 at 17:42
-
by running npm install it will generate node_module package with all other dependencies into it. Goto to project path- run npm install from CLI – Saurav Nov 30 '18 at 07:53
I just had this issue and this solution worked just fine.
run:
npm install react-scripts
that should solve it... Enjoy!!!

- 51
- 4
Just type npm install
and after that run npm start
. This solved the problem for me.

- 398
- 3
- 6
One of the causes of this issue is corrupted PATH and the only fix I found for that issue was to (re)install NVM and let the installer take control over the installed Node version when it asks to do so and it will fix the PATH for you. In my case that was the fix.

- 9,179
- 14
- 63
- 125
deleting the node_modules folder and the *.lock file then running npm install
in the project directory through the terminal worked.
I tried with yarn install
and it worked too after removing the mentioned files above.

- 49
- 3
It's quite common problem. Do the following steps:-
npm audit
The message will be like - 7 vulnerabilities (1 low, 6 high) You will get the vulnerabilities, and now fix it withnpm audit fix
ornpm audit fix --force
will prompt message like this removed 4 packages, changed 82 packages, and audited 1623 packages in 7s
found 0 vulnerabilities
Problem Solved, Happy Hacking

- 1,401
- 1
- 16
- 22
You just have to install React Script Again.
You just need to run the command npm i react-scripts
and then run npm start

- 113
- 1
- 5
this error has happened to me in mern stack, and took around 3h to fix it: in the end, this issue because the current node version is not the same I was used to creating the project for the first time. I hope this proposition helped someone in the future.

- 57
- 6
Hello I'm learning the MERN stack as well(wise use of quarantine time right? ) Anyways, I'm using WINDOWS 10, and I have the same error as well.
I tried react-scripts start
and react-scripts is not recognized as an internal command
I did a bit of googling and found out that you need to
npm install react-scripts -g
<- notice the -g (stands for global? I think? )
I hope this helps :>

- 558
- 4
- 10
Just go to the Terminal and on the directory which you start your server. TYPE npm install react-scripts
you will be good to go

- 178
- 2
- 11
I was trying to use 'nodemon server' then had the same error. When I tried 'npx nodemon server', it worked. Try to use 'npx' in front of 'npm'