0
npx create-react-app my-app

Creating a new React app in G:\project\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.
  yarnpkg add --exact react react-dom react-scripts cra-template --cwd G:\project\my-app has failed.

Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting my-app/ from G:\project
Done.

I have already tried clearing npm cache with npm clear cache --force. The same thing happens.

RobC
  • 20,007
  • 20
  • 62
  • 73
smooth-felix
  • 411
  • 1
  • 3
  • 10
  • Does this answer your question? ['sh' is not recognized as an internal or external command](https://stackoverflow.com/questions/64972826/sh-is-not-recognized-as-an-internal-or-external-command) – Amirhe Jan 16 '21 at 14:42

1 Answers1

0

The problem was with my windows command prompt. When I used Git bash it worked perfectly.

smooth-felix
  • 411
  • 1
  • 3
  • 10