generator-angular
generator-angular copied to clipboard
Task 'wiredep' is not in your gulpfile
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'));
});
having the same issue. when running yo angular im getting hung up in the installation at this missing task.
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.
Btw, it looks like there already is a pull request (#1247) that will resolve this problem!
Why isn't this merged yet?
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)
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
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?