0

I have tried many times to init a webapp by "yo angular" and chosen gulp instead of grunt,but failed with

Task 'wiredep' is not in your gulpfile  
 Please check the documentation for proper gulpfile formatting

then without any moving on task.
when I use ctrl + C to stop it and run with "gulp serve" or "gulp", it shows no error or warning, but the browser's console shows "Uncaught ReferenceError: angular is not defined".
then I tried to replace

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

with

gulp.task('wiredep', function () {  
    return gulp.src(paths.views.main)  
    .pipe(wiredep({  
       directory:  'bower_components',  
       ignorePath: '..'  
     }))", 
.pipe(gulp.dest(yeoman.app ));
}); 

and delete the dist folder, just do like this click here
and I have also tried to update my npm, but they all don't work.
Any ideas?

Community
  • 1
  • 1
  • Are you using gulp-angular-generator – rejo Aug 02 '16 at 08:24
  • take a look at this one http://stackoverflow.com/questions/33459298/yeoman-generator-angular-task-wiredep-is-not-in-gulpfile-useref-restore/36073950#36073950 – rick Aug 02 '16 at 16:03
  • @rick Thanks, I have already tried to do like this, but it doesn't work – Summer-Dong Aug 03 '16 at 09:45
  • @tommoc Yes. I start the task with "yo"-->"angular"-->"gulp instead of grunt"……sorry that I can't understand what your point is. – Summer-Dong Aug 03 '16 at 09:46
  • You can use yeoman generator , https://github.com/swiip/generator-gulp-angular#readme – rejo Aug 03 '16 at 09:58
  • @tommoc he is already using it – rick Aug 03 '16 at 14:42
  • @tommoc Thanks, fixed the problem for me. – Summer-Dong Aug 04 '16 at 07:33
  • I still can't figure out why should this problem truns out, I learn to use yeoman for just a few days. For me, I start with "yo-->angular-->gulp", when I choose grunt but not gulp, there wasn't any problem. But by running "npm install -g generator-gulp-angular", I can really finish a webapp with gulp and angular correctly! – Summer-Dong Aug 04 '16 at 07:48

0 Answers0