Reputation: 20297
/usr/local/lib/node_modules/gulp/bin/gulp:11
throw new Error("Missing Gulpfile");
^
Error: Missing Gulpfile
at Object.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp:11:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
I'm getting this error when I try to do gulp -v.
node -v(0.10.25) works fine and so does npm -v(1.3.24).
I've followed the tutorial from their github but no succes. https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md#getting-started
Can anybody help me out?
Upvotes: 1
Views: 590
Reputation: 1684
I had the same problem also on Ubuntu 12.04. In my case the cause of the problem was an old gulp copy I had installed in a nodejs version 0.6.x. Then I uninstalled nodejs to install a newer version (v0.10.28), it seems all the modules are removed from /usr/lib/node_modules, but the executables are not removed.
So when I installed again gulp, the executable was from a previous version and I was having your problem. What I did to fix the problem was:
sudo npm uninstall -g gulp
sudo rm -rf /usr/local/lib/node_modules/gulp/
sudo rm /usr/local/bin/gulp
sudo npm install -g gulp
Now it should work properly
Upvotes: 0
Reputation: 86
I also had this problem on Ubuntu 12.04.
First, check what version of gulp you have installed in your project - for some mysterious reason my package.json had an older version which it kept installing, this old version required a file called "Gulpfile.js".
Also, trying running the command more verbosely:
/usr/lib/node_modules/gulp/bin/gulp.js --gulpfile /path/to/your/gulpfile.js
There seems to be an issue with the symbolic link of /usr/lib/node_modules/gulp/bin/gulp.js to /usr/bin/gulp. gulp.js has some relative requirements (ie. line 10 https://github.com/gulpjs/gulp/blob/master/bin/gulp.js) which are not being resolved properly when run from the CLI.
I ran "npm cache clean" a few times while troubleshooting this, which clears out bad installs - I don't know if it helped but might be worth a try!
Upvotes: 1
Reputation: 13205
Try updating the global copy of gulp. (npm update --global
) If that doesn't resolve it, post a bug on https://github.com/gulpjs/gulp/issues.
Upvotes: 0