Static GitHub Issues

[2047] Need better way to logs error on Server Error page?

prev: I need access to the req.user and req.ip when using asyncData
next: Component Files not watched in nested pages

All I get is the below image, nothing else.

How can I know what went wrong?

screen shot 2017-11-08 at 2 55 01 pm

The following is my setup.

const cors = require('cors')({ origin: true })
const express = require('express')
const functions = require('firebase-functions')
const fs = require('fs')
const path = require('path')
const { Nuxt } = require('nuxt')

const nuxtDir = path.resolve('.', 'nuxt')
if (fs.existsSync(nuxtDir)) {
  console.log('Nuxt directory exists.', nuxtDir)
} else {
  console.error('Nuxt directory does not exists.', nuxtDir)
}

const app = express()
const nuxt = new Nuxt({ dev: false, buildDir: 'nuxt' })

app.use(cors)
app.use(nuxt.render)

exports.render = functions.https.onRequest(app)

It works if i run firebase serve --only functions,hosting locally But doesn't when i deploy it to firebase and show the above image.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1816">#c1816</a>)</em></sub></div>