21

i have an error in installing react-flux-starter-kit-windows. i have installed latest node.js and npm when i am using this command : npm install -g react-flux-starter-kit it gives me following error

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
Hardik Chaudhary
  • 1,200
  • 1
  • 8
  • 24

6 Answers6

13

It seems that it needs Bash installed. If you're using Windows then you may be able to install it using one of:

rsp
  • 107,747
  • 29
  • 201
  • 177
4

The same error can appear if the bash isn't present in path env, so you need to add it manually. Add this directory to your path env: C:\Program Files\Git\bin

Dauniusha
  • 51
  • 3
3

Go with the steps

Setting->update->for developers->developers mood->on->yes. Control Panel->programs & features->Turn windows features on or off->Windows subsystem for linux->restart computer.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Shilpe Saxena
  • 219
  • 2
  • 8
  • It was helpful but I still was not able to solve the problem completely. I had to install ubuntu app afterwards. – Nasim B. D Jul 29 '21 at 09:41
2

To fix this on Windows, if you install git for windows you will get git.exe at this directory:

C:\Program Files\Git\cmd

but the file is git.exe and you need bash.exe for Windows.

So use this to create a doskey alias to bash command

doskey bash=git

Now type bash at command line and you should see the help output from git.exe.

tdy
  • 36,675
  • 19
  • 86
  • 83
1

I had the same problem and I solved it in 2 stages: First, I turned on the 'Developer Mode' (Settings -> Update and Security -> For developers). Second, I installed Ubuntu app from Microsoft Store, then ran Command Prompt as administrator and typed bash and set a username and password.

Nasim B. D
  • 161
  • 1
  • 6
0

If you're using Windows then you may be able to use GIT Bash which you probably already have it installed or get it from https://gitforwindows.org/ instead of using Windows Command Prompt or Windows PowerShell.

mruanova
  • 6,351
  • 6
  • 37
  • 55