Javascript 运行gulp时出现分析错误

Javascript 运行gulp时出现分析错误,javascript,gulp,Javascript,Gulp,每当运行gulp缩小JavaScript文件时,我的命令终端会出现以下错误。我检查了下面列出的所有文件,但似乎没有发现任何错误。错误消息如下: events.js:182 投掷者;//未处理的“错误”事件 ^ 错误:分析错误: at new HTMLParser (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\html-minifier\src\htmlparser.js:236:13) at minify (C:\wa

每当运行gulp缩小JavaScript文件时,我的命令终端会出现以下错误。我检查了下面列出的所有文件,但似乎没有发现任何错误。错误消息如下: events.js:182 投掷者;//未处理的“错误”事件 ^ 错误:分析错误:
at new HTMLParser (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\html-minifier\src\htmlparser.js:236:13)    at minify (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\html-minifier\src\htmlminifier.js:861:3)
at Object.exports.minify (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\html-minifier\src\htmlminifier.js:1216:10)
at objectAssign.fileName (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\gulp-htmlmin\index.js:22:39)
at module.exports (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\tryit\tryit.js:8:9)
at minifyHtml (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\gulp-htmlmin\index.js:21:9)
at Transform.htmlminTransform [as _transform] (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\gulp-htmlmin\index.js:51:7)
at Transform._read (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\gulp-htmlmin\node_modules\readable-stream\lib\_stream_transform.js:182:10)
at Transform._write (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\gulp-htmlmin\node_modules\readable-stream\lib\_stream_transform.js:170:83)
at doWrite (C:\wamp64\www\webportaluser\viewvendingAdmin\node_modules\gulp-htmlmin\node_modules\readable-stream\lib\_stream_writable.js:406:64)

您可以使用以下格式查找导致错误的行

gulp.task('scripts', ['clean'], function () {
  return gulp.src('js/*.js')
    .pipe(uglify().on('error', function(e){
        console.log(e);
     }))
    .pipe(gulp.dest('minjs'));
});