Home

Issue: 2047

Need better way to logs error on Server Error page?

[issue link]

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.

This question is available on Nuxt.js community (#c1816)