0

This question was previously asked here but the methods specified there do not work.

I am using tags in Next.js to navigate between pages, and they work in both local development environment and local builds. When I deploy to Firebase however Next.js Links aren't dynamic, I can see the "refresh icon" on the browser.

I have added trailing slashes to my routes, i.e /hello/, and to the beginning of api routes, /fetch?x=3. This works everywhere, except on Firebase. I'm deploying with Firebase experimental Next.js support, as outlined here.

This is my Next.js config:

const nextConfig = {
    reactStrictMode: true,
    webpack: (config) => {
        config.resolve.fallback = { fs: false, net: false, tls: false }
        config.externals.push("pino-pretty", "lokijs", "encoding")
        return config
    },
    trailingSlash: true,
}

module.exports = nextConfig
cpix
  • 41
  • 6
  • You deployed it to firebase? Let me know how? because it was experimental and i was having a hard time deploying my app. – Ahmer Saud Aug 08 '23 at 17:59
  • @AhmerSaud what was the issue? I straight up followed the guide, and then set {"frameworksBackend": "minInstances": 0, "maxInstances": 5, "memory": "1GiB" (and the region here)} under hosting key in firebase.json. – cpix Aug 08 '23 at 18:29
  • I did the same, the site was live and working fine and until it became public and site had some traffic, the ssr funcion created by the firebase started to timeout mutiple times, i tried to increase the timeout , then i made some changes to the site and all of the sudden it wont deploy. The error logs were ambigous. It was a complete headache and then i shifted to vercel. We should not get off the topic btw – Ahmer Saud Aug 08 '23 at 18:42
  • I am waiting for a stable release for nextjs integration in firebase. – Ahmer Saud Aug 08 '23 at 18:43
  • Update: I deployed to Google Cloud Run after dockerizing Next.js, there are just so many things that don't work well. – cpix Aug 10 '23 at 20:25

0 Answers0