8

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

rathindu_w
  • 611
  • 1
  • 5
  • 12

2 Answers2

33

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.

rathindu_w
  • 611
  • 1
  • 5
  • 12
1

You could try using the terminal of the IDE you are using instead of the windows cli...

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 16 '22 at 14:46