1

I installed gulp following the standard procedure:

$ npm install --global gulp-cli

adding the project dev dependency

$ npm install --save-dev gulp

and a gulpfile.js

When running gulp from Git Bash I get the error gulp: command not found

I followed related threads here on SO updating my path variable (Windows 7) with C:\Users\username\AppData\Roaming\npm to no avail

I actually didn't find any gulp folders inside C:\Users\username\AppData\Roaming\npm (other packages are still there and function as expected). Instead, gulp seems to get installed to C:\Program Files\Git\usr\local

Running npm root and npm root -g respectively, return C:\Users\username\node_modules and C:\Program Files\Git\usr\local\node_modules

I also got the following warnings when running npm install --save-dev gulp enter image description here

I feel like I mixed up paths somehow, but I'm a bit lost, as I'm new to Node and Gulp.

SomewhereDave
  • 453
  • 8
  • 20

1 Answers1

-1

After open command shell with administrator simply write npm install -g gulp and npm install -g gulp-cli. You can reach from every location to gulp then.

  • Did you exit the shell and load again? – Gürkan Çintesun Apr 13 '18 at 12:38
  • Yes, I also tried this several times and used different shells. Is Gulp getting installed to C:\Program Files\Git\usr\local expected behavior on Windows? I'm asking, because it sits there alone. Other modules like browser_sync reside in a totally different place. – SomewhereDave Apr 13 '18 at 12:39
  • That's nonsense i dont know why this happened. Ok try to add as an environment variables. – Gürkan Çintesun Apr 13 '18 at 12:43
  • So, I do get a response to gulp -v when adding C:\Program Files\Git\usr\local to PATH (I was using C:\Program Files\Git\usr\local\nodes_modules before). The response returns "CLI version" btw. I still wonder, why Gulp ist the only modul that gets installed in this very place – SomewhereDave Apr 13 '18 at 12:47
  • You should add in system env that PATH. – Gürkan Çintesun Apr 13 '18 at 12:48