我一直在穿过gulp-angular发电机。
通过完全卸载npm bower等并重新安装来尝试其他答案。
我在通过生成器时没有遇到任何错误,但是当我尝试运行' gulp build'时,我一直收到此错误
gulp build
[09:16:28] Using gulpfile ~/app/gulpfile.js
[09:16:28] Starting 'scripts'...
[09:16:28] Starting 'styles'...
[09:16:29] Starting 'partials'...
[09:16:29] Starting 'fonts'...
[09:16:29] Starting 'other'...
[09:16:29] gulp-inject 2 files into index.scss.
[09:16:30] Finished 'partials' after 1.28 s
[09:16:30] gulp-ruby-sass: directory
[09:16:30] gulp-ruby-sass: write index.css
write index.css.map
[09:16:30] all files 13.84 kB
[09:16:30] Finished 'scripts' after 2.08 s
[09:16:31] Finished 'styles' after 2.03 s
[09:16:31] Starting 'inject'...
[09:16:31] gulp-inject 1 files into index.html.
[09:16:31] Finished 'other' after 1.61 s
[09:16:31] Finished 'fonts' after 1.68 s
[09:16:31] gulp-inject 10 files into index.html.
[09:16:31] Finished 'inject' after 142 ms
[09:16:31] Starting 'html'...
[09:16:31] gulp-inject 1 files into index.html.
[09:16:31] dist/ maps/styles/app-070ae8ae0a.css.map 13.48 kB
[09:16:32] dist/ maps/styles/vendor-2a1d35e48e.css.map 273.03 kB
[09:16:33] dist/ maps/scripts/app-6e2669f540.js.map 14.81 kB
events.js:142
throw er; // Unhandled 'error' event
^
Error: scripts/vendor-70aa324478.js: error: couldn't process source due to parse error
Unexpected token (49992:4)
我认为它在那个文件,脚本/供应商......但我发现它是由gulp生成的。
这是我的Gulp文件。
/**
* Welcome to your gulpfile!
* The gulp tasks are splitted in several files in the gulp directory
* because putting all here was really too long
*/
'use strict';
var gulp = require('gulp');
var wrench = require('wrench');
/**
* This will load all js or coffee files in the gulp directory
* in order to load all gulp tasks
*/
wrench.readdirSyncRecursive('./gulp').filter(function(file) {
return (/\.(js|coffee)$/i).test(file);
}).map(function(file) {
require('./gulp/' + file);
});
/**
* Default task clean temporaries directories and launch the
* main optimization build task
*/
gulp.task('default', ['clean'], function () {
gulp.start('build');
});
任何指导将不胜感激!
提前谢谢