Skip to content

Instantly share code, notes, and snippets.

@zenius
Created June 5, 2019 13:20
Show Gist options
  • Save zenius/8d180e0084c2ed7048765633efb550d5 to your computer and use it in GitHub Desktop.
Save zenius/8d180e0084c2ed7048765633efb550d5 to your computer and use it in GitHub Desktop.
https://github.com/chrisyip/koa-pug#basedir
basedir
If you encounter this error, Error: the "basedir" option is required to use "extends" with "absolute" paths, try to set basedir like this:
const pug = new Pug({
viewPath: 'path/to/views',
basedir: 'path/for/pug/extends'
})
or
app.use(function* () {
this.render('index', locals, { basedir: 'path/for/pug/extends' })
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment