Next.js Discord

Discord Forum

how to deploy a Nextjs application on Firebase?

Unanswered
Singapura posted this in #help-forum
Open in Discord
SingapuraOP
Hello,

I am using Nextjs App Router with Version - 15.1.4 with Turbopack, and I wanted to know how can I deploy the Nextjs App (both Static & SSR) on Firebase?

is there any guide or resource available to check and follow in-order to deploy the Nextjs App on Firebase.

any help?

3 Replies

@Singapura Hello, I am using Nextjs App Router with Version - `15.1.4` with Turbopack, and I wanted to know how can I deploy the Nextjs App (both Static & SSR) on Firebase? is there any guide or resource available to check and follow in-order to deploy the Nextjs App on Firebase. any help?
Masai Lion
I too am looking for some guidance here. My Nextjs App works fine on my local.

But when I try to deploy using firebase deploy it is throwing an error: Internal Server Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server.

I am building my app first using npm run build and can see the files under .next folder as well. But when I open the Firebase URL, I see the above error.

Unable to figure out how to resolve this.
Asiatic Lion
I used the experimental flag and was able to, it uses cloud run functions for ssr