No gulpfile found

2020-04-03 06:35发布

I am new in laravel. I am trying the command nmp install. it does not work. Then as shown in their official documentation, I tried

npm install --global gulp-cli

but I was getting access denied error. So I gave

sudo npm install --global gulp-cli

It seemed to give me some correct result. then I gave

npm install --no-bin-links

but it says that,

"npm WARN vagrant@1.0.0 No description npm WARN vagrant@1.0.0 No repository field." I tried

npm install -d

though the result ended with "ok" (after running the command the first line said "it worked if it ends with ok"), it still contains ""npm WARN vagrant@1.0.0 No description npm WARN vagrant@1.0.0 No repository field." And when I gave the command

gulp

the answer was no gulpfile found. In my project there is a gulpfile.js file (I am not sure about which gulpfile it is talking :\ )

what to do? My node version is V5.12.0

8条回答
叛逆
2楼-- · 2020-04-03 07:30

It won't find the gulp file if it is spelled Gulpfile.js, either. That capital G has thrown me down a well or two. Really make sure of your syntax!

查看更多
我只想做你的唯一
3楼-- · 2020-04-03 07:33

This error means that gulp doesn't find gulpfile.js to follow the instructions. To solve this error we need to add gulpfile.js to our directory root by running the command.

Create gulpfile.js and then add

var gulp = require('gulp');
gulp.task('default', function () { 
    console.log('Hello Gulp!') 
});
查看更多
登录 后发表回答