semantic-ui使用gulp执行build-css报错

1.执行gulp build-css报错css

[09:40:49] Starting 'build-css'...
Building CSS
Potentially unhandled rejection [2] TypeError: Cannot call method 'match' of und
efined
at DestroyableTransform.module.exports.settings.plumber.less.errorHandler (E
:\devtools\nodejs4\node_modules\semantic-ui\tasks\config\tasks.js:92:29)

2.找到\devtools\nodejs4\node_modules\semantic-ui\tasks\config\tasks.js:92行代码为node

  if(error.filename.match(/theme.less/)) {

  从错误提示能够看出error.filename没有match方法,修改代码将error打印出来,gulp

  console.error(error);
  console.error(error.filename);
[09:40:49] Starting 'build-css'...

Building CSS
[Error: no writecb in Transform class]
undefined
Potentially unhandled rejection [2] TypeError: Cannot call method 'match' of und
efined
at DestroyableTransform.module.exports.settings.plumber.less.errorHandler (E
:\devtools\nodejs4\node_modules\semantic-ui\tasks\config\tasks.js:94:29)

  从输出日志能够看出error.filename为underfined,而no writecb in Transform class。。。less

  进一步得知no writecb...错误是nodejs抛出的错误。ui

事实证实是bug, Installing gulp-autoprefixer@2.3.1 fixed it。日志

相关文章
相关标签/搜索