question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NextJS site not getting deployed when having multi-site options

See original GitHub issue

Issue: trying to get a next.js site deployed to firebase hosting when having 2 sites configured.

"hosting": [
    {
      "target": "web",
      "public": "apps/web/public",
      "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
      "rewrites": [
        {
          "source": "**",
          "destination": "/index.html"
        }
      ]
    },
    {
      "target": "app",
      "source": "apps/app/.",
      "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
      "rewrites": [
        {
          "source": "**",
          "destination": "/index.html"
        }
      ]
    }
  ],

Error received: Error: An unexpected error has occurred

Screen Shot 2022-05-30 at 3 57 35 pm

I am using lerna for monorepo approach and the nextjs app is inside app package. This approach works when there is only one site to deploy but fails in multi-site hosting when we add the target attribute.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

1reaction
jamesdanielscommented, Jul 12, 2022

Def pathing issues, I’ll put together a fix for an upcoming firebase-tools release.

1reaction
jamesdanielscommented, Jun 22, 2022

Ah that’s helpful thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to configure multisite in Sitecore Next.js application?
This depends entirely on your requirements. Separate applications would enable you to develop, deploy, and scale sites independently.
Read more >
How to deploy next.js webapp with firebase multi site ...
i tried to deploy a next.js app using firebase multi site hosting but i am not able to understand what the folder structure...
Read more >
Advanced Features: Multi Zones
A zone is a single deployment of a Next.js app. You can have multiple zones and merge them as a single app. For...
Read more >
How to Build a Multi-Tenant App with Custom Domains ...
Create a full-stack application with multi-tenancy and custom domain support using Next.js, Prisma, PlanetScale, and Tailwind CSS.
Read more >
Multisite support for Sitecore JSS – Next.js using Vercel's ...
If you have a look at the Sitecore Nextjs SDK and/or the starter templates, you'll notice that there is no support for multi-site, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found