Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Task 'wiredep' is not in your gulpfile #1350

Open
mradzinski opened this issue Aug 10, 2016 · 7 comments
Open

Task 'wiredep' is not in your gulpfile #1350

mradzinski opened this issue Aug 10, 2016 · 7 comments

Comments

@mradzinski
Copy link

Generator fails with:

[19:42:09] Using gulpfile ~/Projects/skedul/gulpfile.js
[19:42:09] Task 'wiredep' is not in your gulpfile
[19:42:09] Please check the documentation for proper gulpfile formatting

It seems the generator is trying to run the wiredep task, but in my gulpfile.js wiredep is not a task but a plugin import which gets used by the bower task:

var wiredep = require('wiredep').stream;

// inject bower components
gulp.task('bower', function () {
  return gulp.src(paths.views.main)
    .pipe(wiredep({
      directory: yeoman.app + '/bower_components',
      ignorePath: '..'
    }))
  .pipe(gulp.dest(yeoman.app + '/views'));
});
@lmkerr
Copy link

lmkerr commented Aug 17, 2016

having the same issue. when running yo angular im getting hung up in the installation at this missing task.

@ghost
Copy link

ghost commented Aug 20, 2016

To resolve this I had to make a few changes to the gulpfile.js and where bower_components is installed. These are the changes I had to make to get up and running.

After making these changes I ran bower install again and then gulp serve. The one thing to note is that I moved the bower_components installing into the app folder. The grunt version of this generator uses some middleware to point to bower_components which I assume was done to make the build process smoother or something.

@ghost
Copy link

ghost commented Aug 20, 2016

Btw, it looks like there already is a pull request (#1247) that will resolve this problem!

@miparnisari
Copy link

Why isn't this merged yet?

@Khaleel
Copy link

Khaleel commented Dec 2, 2016

grunt serve works but I get this error when running grunt build

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: Error: File not found with singular glob: /www/myApp/bower_components/bootstrap/dist/css/bootstrap.css
    at DestroyableTransform.<anonymous> (/www/myApp/node_modules/gulp-useref/index.js:65:28)
    at emitOne (events.js:82:20)
    at DestroyableTransform.emit (events.js:169:7)
    at emitOne (events.js:77:13)
    at DestroyableTransform.emit (events.js:169:7)
    at Glob.<anonymous> (/www/myApp/node_modules/gulp-useref/node_modules/glob-stream/index.js:40:16)
    at Glob.g (events.js:260:16)
    at emitOne (events.js:77:13)
    at Glob.emit (events.js:169:7)
    at Glob._finish (/www/myApp/node_modules/gulp-useref/node_modules/glob-stream/node_modules/glob/glob.js:172:8)
    at done (/www/myApp/node_modules/gulp-useref/node_modules/glob-stream/node_modules/glob/glob.js:159:12)
    at Glob._processSimple2 (/www/myApp/node_modules/gulp-useref/node_modules/glob-stream/node_modules/glob/glob.js:652:12)
    at /www/myApp/node_modules/gulp-useref/node_modules/glob-stream/node_modules/glob/glob.js:640:10
    at Glob._stat2 (/www/myApp/node_modules/gulp-useref/node_modules/glob-stream/node_modules/glob/glob.js:736:12)
    at lstatcb_ (/www/myApp/node_modules/gulp-useref/node_modules/glob-stream/node_modules/glob/glob.js:728:12)
    at RES (/www/myApp/node_modules/inflight/inflight.js:31:16)

@mavieth
Copy link

mavieth commented Dec 13, 2016

This one did the trick for me

rm -rf bower_components node_modules && bower cache clean && npm cache clean && npm install -g gulp wiredep && npm install && bower install

@sudheerkaushik
Copy link

Everytime I create an angular project using yeoman, I have to install so many dependencies which go unfound when running gulp serve . Any solutions to this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants