当前位置: 首页 > 面试题库 >

'bash'不被识别为内部或外部命令

云新知
2023-03-14
问题内容

我在安装react-flux-starter-kit-windows时出错。我在使用以下命令时已经安装了最新的node.js和npm:npm install
-g react-flux-starter-kit它给了我以下错误

react-flux-starter-kit@1.1.4 postinstall C:\Users\Hardik\AppData\Roaming\npm\node_modules\react-flux-starter-kit
bash setup.sh
'bash' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Hardik\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "react-flux-starter-kit"
npm ERR! node v6.9.5
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! react-flux-starter-kit@1.1.4 postinstall: bash setup.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-flux-starter-kit@1.1.4 postinstall script 'bash setup.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-flux-starter-kit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bash setup.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-flux-starter-kit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls react-flux-starter-kit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Hardik\AppData\Roaming\npm-cache_logs\2017-02-22T10_01_48_356Z-debug.log

问题答案:

似乎需要安装Bash。如果您使用的是Windows,则可以使用以下方式之一进行安装:

  • https://git-for-windows.github.io/
  • https://www.cygwin.com/
  • https://msdn.microsoft.com/zh-CN/commandline/wsl/about
  • http://win-bash.sourceforge.net/


 类似资料:
  • 问题内容: 键入命令时出现以下错误: 无法将“ mvn”识别为内部或外部命令,可操作程序或批处理文件。 我也遵循了这个步骤,但是仍然无法完成工作。 当我键入此命令时,我得到的路径打印为 当我键入“ echo%M2%”时,我的路径打印为 环境 : 问题答案: 确保在路径中设置了maven bin目录,并设置了JAVA_HOME属性

  • 问题内容: 我尝试安装此软件。为此,需要Python。 我从这里name安装了Python 。 我正在Windows 7上工作。 之后,我做 当我运行任何Python文件时,它显示 python无法识别为内部或外部命令,可操作程序或批处理文件。无法创建vc项目文件。 我该如何解决? 问题答案: 您要追加到字符串,而不是scripts文件夹。基本上,您希望路径上带有实际二进制文件的文件夹。

  • 我将环境变量设置为: 和 以及将它们添加到路径,调用: 但是从命令调用仍然会产生错误: 这个问题的原因是什么?

  • 我从VSCode 0.10.6更新到0.10.8,并第一次尝试使用Typescript。不幸的是,当我告诉VSCode构建时,我得到了错误: 我根据VS代码说明创建了一个新的“HelloWorld”项目。这包括: 我为一个新的package.json运行了 我运行,因为我想要本地安装,而不是全局安装。 我创建了一个launch.json来定义Node.js项目。 我创建了tasks.json文件,

  • 问题内容: 我在尝试在计算机上安装Django时遇到了一个奇怪的错误。 这是我在命令行中键入的序列: 是什么原因造成的? 编辑 根据要求,这是我输入echo%PATH%时得到的结果 问题答案: 你需要将pip安装的路径添加到PATH系统变量中。默认情况下,pip已安装(pip现在与新版本的python捆绑在一起),因此需要将路径“ 添加到PATH变量中。 要检查它是否已经在PATH变量中,请在CM

  • 我遵循了所有的教程,并尝试使用Maven。 我运行Win7,并下载了maven 3.5.4。 > 我将zip文件放在C:\Maven下,并将其解压缩到该位置。 我错过了什么?