无法将"sh"识别为内部或外部命令 [英] 'sh' is not recognized as an internal or external command

查看:254
本文介绍了无法将"sh"识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在E:\ rn-starter \ my-app中创建一个新的React应用.

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

安装软件包.这可能需要几分钟.正在安装具有cra模板的react,react-dom和react-scripts ...

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

'sh'不被识别为内部或外部命令,可操作程序或批处理文件.

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

中止安装.npm install --save --save-exact --loglevelerror react react-dom react-scripts cra-template失败.

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

正在删除生成的文件... package.json从以下位置删除my-app/E:\ rn-starter完成.

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

每当我尝试创建新的React项目或React Native项目时,都会弹出此错误.尝试重新安装节点和

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

推荐答案

我正在使用Windows命令提示符来执行此操作.使用git bash为我解决了这个问题.我认为问题与sh-shell文件在Windows中默认不被识别.但是,对于git bash而言,由于默认情况下它可以识别shell脚本,因此它确实运行良好.

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.

这篇关于无法将"sh"识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆