0
I’m working on a phonegap/angular project, so I did all the steps as I’m used to. I have installed Node, Bower, Gulp, Angularjs, phonegap and Cordova. Then I "cloned" the project, installed Bower/angular/Gulp locally in the project folder and made a gulp build
to compile my app. This is what happens after this:
11:18:43] Using gulpfile ~/*projectfolder*/gulpfile.js
[11:18:43] Starting 'build'...
[11:18:43] Starting 'clean'...
[11:18:43] Finished 'clean' after 24 ms
[11:18:43] Starting 'html'...
[11:18:43] Finished 'html' after 2.77 ms
[11:18:43] Starting 'fonts'...
[11:18:43] Starting 'images'...
[11:18:43] Starting 'less'...
[11:18:43] Finished 'less' after 5.92 ms
[11:18:43] Starting 'js'...
[11:18:43] Finished 'js' after 23 ms
events.js:85
throw er; // Unhandled 'error' event
^
Error
at new Parser (*projectfolder*/node_modules/gulp-less/node_modules/less/lib/less/parser.js:333:27)
at Object.less.render (*projectfolder*/node_modules/gulp-less/node_modules/less/lib/less/index.js:18:22)
at Transform._transform (*projectfolder*/node_modules/gulp-less/index.js:38:10)
at Transform._read (*projectfolder*/node_modules/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Transform._write (*projectfolder*/node_modules/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (*projectfolder*/node_modules/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at writeOrBuffer (*projectfolder*/node_modules/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
at Transform.Writable.write (*projectfolder*/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
at write (*projectfolder*/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
at flow (*projectfolder*/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
So if everything is going wrong after compiling the js files, I think the problem is in them. What I’m doing wrong?
gulp.task('js', function() {
streamqueue({ objectMode: true },
gulp.src(config.vendor.js),
gulp.src('./src/js/**/*.js').pipe(ngFilesort()),
gulp.src(['src/templates/**/*.html']).pipe(templateCache({ module: 'InfoBox' }))
)
.pipe(sourcemaps.init())
.pipe(concat('app.js'))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(sourcemaps.write('.'))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest(path.join(config.dest, 'js')));
});
Thank you!