Build fails when reporting CSS syntax error
If there is an error in the CSS syntax (such as a missing closing bracket), the build fails with the following message:
TypeError in plugin "gulp-postcss"
Message:
_this.setMessage is not a function
Details:
fileName: /home/dallen/projects/antora/antora-ui-default/src/css/site.css
domainEmitter: [object Object]
domain: [object Object]
domainThrown: false
Stack:
TypeError: _this.setMessage is not a function
This happens due to a bad interaction with Opal. (Opal redefines Error.call and it fails to function properly after that). One fix is to upgrade to Asciidoctor.js >= 2. Until then, the following patch can be applied:
Error.call = (self, ...args) => {
const err = new Error(...args)
return Object.assign(self, { message: err.message, stack: err.stack })
}
Edited by Dan Allen