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

我的未来我决定 提交于 2021-02-11 15:08:32

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/64972826/sh-is-not-recognized-as-an-internal-or-external-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!