Git Bash – Gulp:不能执行命令“gulp”; 错误:找不到模块
我正在关注Bootstrap上的Udemy教程。
我在Git Bash中的文件夹C:/bs4projects/bs4starter
中,但是当我运行命令“ gulp
”时,它会给我这个错误:
Error: Cannot find module 'C:\c\Users\[username]\AppData\Roaming\npm\node_modules\gulp-cli\bin\gulp.js
我注意到它在path上添加了一个名为“ c
”的额外文件夹,我不知道如何改变它应该查找的PATH
。
我也注意到它不是在我的bs4starter
文件夹里面bs4starter
请帮忙,一直在努力寻找解决scheme。
我检查了我的gulp.js
安装在我的bs4starter
文件夹和\npm\node_modules\gulp-cli
文件夹中,他们都在那里,所以我想我正确地安装了它。
在Git bash中,检查你的$ PATH
echo $PATH
你可以修复它
export PATH=/c/Users[username]/AppData/Roaming/npm/node-modules/gulp-cli/bin:...(rest of the $PATH)