Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Bash - Gulp: Can't execute command "gulp"; Error: Cannot find module

I'm following a Udemy Tutorial on Bootstrap.
I'm inside the folder C:/bs4projects/bs4starter in Git Bash but when I run the command "gulp", it will give me this error:

Error: Cannot find module 'C:\c\Users\[username]\AppData\Roaming\npm\node_modules\gulp-cli\bin\gulp.js 

I noticed that it's adding an extra folder called "c" on the path and I don't know how to change the PATH of where it should should look for.
I also noticed that it isn't looking for gulp.js that is inside my bs4starter folder.
Please help, been trying to find solutions all day.

I checked my gulp.js both installed in my bs4starter folder and in \npm\node_modules\gulp-cli folder and they're both there so I think I installed it correctly.

error

like image 689
Argh Avatar asked Sep 18 '26 23:09

Argh


1 Answers

In Git bash, check your $PATH

echo $PATH

You can fix it with

export PATH=/c/Users[username]/AppData/Roaming/npm/node-modules/gulp-cli/bin:...(rest of the $PATH)
like image 101
VonC Avatar answered Sep 20 '26 13:09

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!