Juliatzin
Juliatzin

Reputation: 19695

error with Gulp / Bower

I'm trying to run gulp, but I get a lot of errors.

First, I ran npm install, and I had to wait like 30 min to finish.

Then, I ran gulp, and I get:

vagrant@homestead:~/senosiain$ gulp
[21:19:34] Using gulpfile ~/senosiain/gulpfile.js
[21:19:34] Starting 'default'...
[21:19:34] Starting 'task'...
[21:19:34] Starting 'bower'...
[21:19:34] Using cwd:  /home/vagrant/senosiain
[21:19:34] Using bower dir:  ./bower_components
[21:19:35] 'bower' errored after 653 ms
[21:19:35] Error: Cannot find module 'mkdirp'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/vagrant/senosiain/node_modules/gulp-bower/node_modules/bower/lib/core/Manager.js:4:14)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
[21:19:35] Error in plugin 'run-sequence'
Message:
    An error occured in task 'bower'.
[21:19:35] Finished 'task' after 747 ms
[21:19:35] Finished 'default' after 768 ms

So, I run

npm install mkdirp

and it works fine, and then I run gulp, and the same message appear with another lib.

I've been installing like 20 libs like that and I'm tired, and thinking maybe there's 300 of them, so something is wrong....

I also ran bower install

npm install gulp -g
npm install (inside folder)
gulp bower ( fails the same way)

Any Idea how should I do it not to do it one by one???

Upvotes: 1

Views: 2041

Answers (1)

Antiga
Antiga

Reputation: 2274

Try clearing the npm cache and starting fresh.

npm cache clean

Completely delete the node_modules folder. Then..

npm install

Upvotes: 2

Related Questions