1.执行gulp build-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行代码为

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

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

  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。。。

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

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
  • 2022-12-23
  • 2021-08-15
  • 2021-08-09
  • 2022-12-23
相关资源
相似解决方案