Gulp Uglify错误无法缩小JavaScript

时间:2017-12-18 17:35:29

标签: gulp-uglify

是的 - 我正在翻滚杂草!我没有代码书呆子,但设法到目前为止。

我能够" gulp"很长一段时间但突然间我无法做到。 如果有人能指出我正确的方向。 最近几天谷歌搜索没有运气......

尝试重新安装网络应用。试图寻找类型错误。 试图安装泵(所以我可以找到错误 - 我认为没有设法正确安装)。 试图弄清楚它是否与ES6有关> ES5 - 所以试图恢复 - w。巴别...

无论如何,任何帮助都会很棒, 谢谢

events.js:160
      throw er; // Unhandled 'error' event
      ^
GulpUglifyError: unable to minify JavaScript
    at createError (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/gulp-uglify/lib/create-error.js:6:14)
    at wrapper (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/lodash/_createHybrid.js:87:15)
    at trycatch (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/gulp-uglify/minifier.js:26:12)
    at DestroyableTransform.minify [as _transform] (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/gulp-uglify/minifier.js:79:19)
    at DestroyableTransform.Transform._read (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/readable-stream/lib/_stream_transform.js:182:10)
    at DestroyableTransform.Transform._write (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/readable-stream/lib/_stream_transform.js:170:83)
    at doWrite (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/readable-stream/lib/_stream_writable.js:406:64)
    at writeOrBuffer (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/readable-stream/lib/_stream_writable.js:395:5)
    at DestroyableTransform.Writable.write (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/readable-stream/lib/_stream_writable.js:322:11)
    at Readable.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:96:13)
    at Readable.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Readable.push (_stream_readable.js:134:10)
    at /Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/fork-stream/index.js:51:13
    at classifier (/Users/peterthomasfalkenberg/Documents/PTF/Kode/ptf_18/node_modules/ternary-stream/index.js:20:11)



{
  "private": true,
  "engines": {
    "node": ">=4"
  },
  "devDependencies": {
    "babel-core": "^6.4.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-es2015": "^6.3.13",
    "babel-register": "^6.5.2",
    "browser-sync": "^2.2.1",
    "del": "^2.2.0",
    "gulp": "^3.9.0",
    "gulp-autoprefixer": "^3.0.1",
    "gulp-babel": "^6.1.1",
    "gulp-cache": "^0.4.2",
    "gulp-cssnano": "^2.0.0",
    "gulp-eslint": "^3.0.0",
    "gulp-filter": "^4.0.0",
    "gulp-htmlmin": "^3.0.0",
    "gulp-if": "^2.0.2",
    "gulp-imagemin": "^3.0.1",
    "gulp-load-plugins": "^1.2.4",
    "gulp-plumber": "^1.0.1",
    "gulp-sass": "^3.0.0",
    "gulp-size": "^2.1.0",
    "gulp-sourcemaps": "^2.2.0",
    "gulp-uglify": "^2.0.0",
    "gulp-useref": "^3.0.0",
    "main-bower-files": "^2.5.0",
    "run-sequence": "^1.2.2",
    "wiredep": "^4.0.0"
  },
  "eslintConfig": {
    "env": {
      "es6": true,
      "node": true,
      "browser": true
    },
    "rules": {
      "quotes": [
        2,
        "single"
      ]
    }
  },
  "dependencies": {
    "gulp-util": "^3.0.8",
    "pump": "^2.0.0"
  }
}

1 个答案:

答案 0 :(得分:0)

好的使用好的老"排除"方法.. 发现这是一个旧的猫头鹰Carousel(V 1.3.4)插件导致问题...我想在某些时候更新了我的一些节点模块,它不能" gulp"之后..更新猫头鹰旋转木马2现在它的工作原理 - 除了我做了一些很好的mods到猫头鹰旋转木马现在丢失了。 (GRR)