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