Olá Pessoal,
Estou com um problema. Seguindo o curso de GULP, na seção 3, quando uso o "uglify" me deparo com um erro que não sei resolver..
events.js:141
throw er; // Unhandled 'error' event
^
Error
at new JS_Parse_Error (/home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:196:18)
at js_error (/home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:204:11)
at parse_error (/home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:314:9)
at /home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:534:36
at Object.next_token [as input] (/home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:559:36)
at next (/home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:666:25)
at expect_token (/home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:699:20)
at expect (/home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:704:36)
at /home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:1220:9
at /home/epansani/Dropbox/Alura/Curso Gulp/projeto2/node_modules/uglify-js/lib/parse.js:727:24
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "gulp"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! projeto2@1.0.0 gulp: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the projeto2@1.0.0 gulp script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the projeto2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs projeto2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls projeto2
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/epansani/Dropbox/Alura/Curso Gulp/projeto2/npm-debug.log
Alguém sabe o que pode ser?
ps. meu gulpfile.js:
var gulp = require('gulp')
,imagemin = require('gulp-imagemin')
,clean = require('gulp-clean')
,concat = require('gulp-concat')
,htmlReplace = require('gulp-html-replace')
,uglify = require('gulp-uglify');
gulp.task('default', ['copy'], function() {
gulp.start('build-img', 'build-html', 'build-js');
});
gulp.task('copy', ['clean'], function() {
return gulp.src('src/**/*')
.pipe(gulp.dest('dist'));
});
gulp.task('clean', function() {
return gulp.src('dist')
.pipe(clean());
});
// adicionando a dependência copy
gulp.task('build-img', function() {
gulp.src('dist/img/**/*')
.pipe(imagemin())
.pipe(gulp.dest('dist/img'));
});
gulp.task('build-js', function() {
gulp.src(['dist/js/jquery.js',
'dist/js/home.js',
'dist/js/ativa-filtro.js'])
.pipe(concat('all.js'))
.pipe(uglify())
.pipe(gulp.dest('dist/js'));
});
gulp.task('build-html', function() {
gulp.src('dist/**/*.html')
.pipe(htmlReplace({
'js': 'js/all.js'
}))
.pipe(gulp.dest('dist/'));
});