internal server error when deploying NextJs to firebase

806 Views Asked by At

I have deployed my NextJS project (adapted from https://github.com/zeit/next.js/tree/master/examples/with-firebase-hosting) to firebase, but when i browse to the URL i get "Internal Server Error".

Deployment did run through successfully:

i  deploying database, functions, hosting
+  database: rules ready to deploy.
i  functions: ensuring necessary APIs are enabled...
i  runtimeconfig: ensuring necessary APIs are enabled...
+  runtimeconfig: all necessary APIs are enabled
+  functions: all necessary APIs are enabled
i  functions: preparing src/functions directory for uploading...
i  functions: packaged src/functions (571.83 KB) for uploading
+  functions: src/functions folder uploaded successfully
i  hosting: preparing src/public directory for upload...
!  Warning: Public directory does not contain index.html

i  Progress: [....................................................................................................]

+  hosting: 3 files uploaded successfully
i  starting release process (may take several minutes)...
i  functions: updating function next...
+  functions[next]: Successful update operation.
+  functions: all functions deployed successfully!

+  Deploy complete!

So i feel perhaps it is something to do with the structure of my project? Or firebase.json config? Could someone have a look and let me know?

Here is my firebase.json which is in the root of my project:

{
  "database": {
    "rules": "database.rules.json"
  },
  "functions": {
    "source": "src/functions"
  },
  "hosting": {
    "public": "src/public",
    "rewrites": [
      {
        "source": "**/**",
        "function": "next"
      }
    ],
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  }
}
0

There are 0 best solutions below