We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
执行ath s后,log最后如下:
[14:14:11] 开始tuan模块任务styles! [14:14:12] gulp-postcss: buy.css
然后无错误退出,在其它机器上正常使用
node: 10.3.0 (nvm管理) npm:6.1.0 athena-html:1.4.14
.pipe($.if(isServe, athenaMate.plumber())) // 删除这行正常,进一步排查这个函数
我的疑问是在93行中,每次执行pipe2的时候已经会重新patchPipe了,这里为什么在pathPipe函数中还要监听重新patch一次?
The text was updated successfully, but these errors were encountered:
function patchPipe(stream) { if (stream.pipe2) { wrapPanicOnErrorHandler(stream); stream._pipe = stream._pipe || stream.pipe; stream.pipe = stream.pipe2; stream.once('readable', patchPipe.bind(null, stream)); // 第66行,删除后正常使用 stream._plumbed = true; } } through.pipe2 = function pipe2(dest) { if (!dest) { throw new gutil.PluginError('plumber', 'Can\'t pipe to undefined'); } this._pipe.apply(this, arguments); if (dest._unplumbed) { return dest; } removeDefaultHandler(this, 'error'); if (dest._plumber) { return dest; } dest.pipe2 = pipe2; // Patching pipe method if (opts.inherit !== false) { patchPipe(dest); // 第93行 } // Placing custom on error handler if (this.errorHandler) { dest.errorHandler = this.errorHandler; dest.on('error', this.errorHandler.bind(dest)); } dest._plumbed = true; return dest; };
Sorry, something went wrong.
问题大概定位到,升级Node 10以上版本,会出现。
解决方案: 注释上面的93行(保留66行) (全局npm目录)/node_modules/athena-html/lib/build/athena_mate/athena_plumber.js
No branches or pull requests
问题描述
执行ath s后,log最后如下:
然后无错误退出,在其它机器上正常使用
环境
node: 10.3.0 (nvm管理)
npm:6.1.0
athena-html:1.4.14
定位
把自定义包装pipe的代码去掉后,正常使用
.pipe($.if(isServe, athenaMate.plumber())) // 删除这行正常,进一步排查这个函数
对应文件是lib/build/athena_mate/athena_plumber.js
删除第66行代码后正常,具体见下方评论。
疑问
我的疑问是在93行中,每次执行pipe2的时候已经会重新patchPipe了,这里为什么在pathPipe函数中还要监听重新patch一次?
The text was updated successfully, but these errors were encountered: