Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'sh' is not recognized as an internal or external command

Creating a new React app in E:\rn-starter\my-app.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template...

'sh' is not recognized as an internal or external command, operable program or batch file.

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json Deleting my-app/ from E:\rn-starter Done.

This error pops-up whenever I try to create a new react project or react native project. tried re-installing node and

like image 348
rathindu_w Avatar asked Dec 09 '25 21:12

rathindu_w


2 Answers

I was using windows command prompt to do this. Using the git bash resolved the problem for me. The issue I think was with sh - shell files not being recognized by default in windows. However with git bash, since it by default recognizes the shell scripts it did work perfectly.

like image 111
rathindu_w Avatar answered Dec 12 '25 13:12

rathindu_w


Using the git bash works, but you could also add git (bin folder) to your Path environment variable if you want to run shell scripts in windows terminal.

Default installation path for git is: C:\Program Files\Git

enter image description here enter image description here

like image 33
Mangs Avatar answered Dec 12 '25 11:12

Mangs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!