adonuxt-template
adonuxt-template copied to clipboard
Unhandled promise rejection
Just installed and tried to build the boilerplate but facing 'Unhandled promise rejection (rejection id: 2): TypeError: this.nuxt.build is not a function'

Need help, thanks
I have same problem on my heroku build.
EDIT: Production build is not working for me, but i got development build to work.
Did you resolve this issue? I am stucked in same issue
@ChangJoo-Park If im not wrong then i think i edited my App\Http\Controllers\NuxtController to get it work
'use strict'
const Env = use('Env')
const Config = use('Config')
const { Nuxt, Builder } = require('nuxt')
class NuxtController {
constructor () {
let config = Config.get('nuxt')
config.dev = Env.get('NODE_ENV') === 'development'
this.nuxt = new Nuxt(config)
// Start build process (only in development)
if (config.dev) {
new Builder(this.nuxt).build()
}
}
* render (request, response) {
this.nuxt.render(request.request, response.response)
}
}
module.exports = new NuxtController()