在粉笔版本从2.4.2更新到3.0.0之后,得到了下面的问题。吞食生成失败,导致生产构建失败。
--- frontend-maven-plugin:1.0:gulp (gulp build) @ vcedpa ---
[INFO] Running 'gulp.js build' in /auto/builds/idpa/main/640037/vcedpa-war/../ui
[ERROR] /auto/builds/idpa/main/640037/ui/node_modules/run-sequence/node_modules/chalk/source/index.js:3
[ERROR] const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');
[ERROR] ^
[ERROR]
[ERROR] SyntaxError: Unexpected token {
[ERROR] at exports.runInThisContext (vm.js:53:16)
[ERROR] at Module._compile (module.js:373:25)
[ERROR] at Object.Module._extensions..js (module.js:416:10)
[ERROR] at Module.load (module.js:343:32)
[ERROR] at Function.Module._load (module.js:300:12)
[ERROR] at Module.require (module.js:353:17)
[ERROR] at require (internal/module.js:12:17)
[ERROR] at Object. (/auto/builds/idpa/main/640037/ui/node_modules/run-sequence/index.js:5:14)
[ERROR] at Module._compile (module.js:409:26)
[ERROR] at Object.Module._extensions..js (module.js:416:10)
Immediate answer will be much appreciated.发布于 2019-11-12 19:28:37
我发现了问题,降级到2.4.2解决了这个问题
发布于 2019-11-13 23:32:03
你能把你的gulpfile.js发出去吗?由于Gulp本身只是一个任务运行程序,您的gulpfile.js可能会帮助我们确定它的失败位置。
只要看一下错误本身,这里的gulp就可能出现了对象析构的问题( chalk.js版本2.4.2的源代码似乎没有使用这个问题)。我个人最近遇到了一些gulp-babel和/或gulp-uglify不能正常工作的问题,基本上是对现代JavaScript特性的抱怨,不得不用terser替换gulp-uglify。
我的猜测是,您使用的任何细化/丑化库都没有被更新,因此不会“获取”对象的破坏。
https://stackoverflow.com/questions/58812480
复制相似问题