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.

[BUG] Fails to deploy NextJS app

See original GitHub issue

I’m able to deploy my NextJS app directly (firebase deploy), however when I deploy via a PR or Merge action I get an error.

My repo is structured like so (the next app is in /frontend)

  • firebase.json
  • .github/workflows/firebase-hosting-merge.yml
  • frontend/pages
  • functions

My firebase.json is:

{
  "functions": {
    "source": "functions"
  },
  "hosting": {
    "source": "frontend",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
  }
}

Action config

name: Deploy to Firebase Hosting on PR
'on': pull_request
jobs:
  build_and_preview:
    if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: '${{ secrets.GITHUB_TOKEN }}'
          firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SDXCRYPTO_ALGOVERA }}'
          projectId: sdxcrypto-algovera

Error message

Error: Cannot deploy a web framework to hosting because the experiment webframeworks is not enabled. To enable webframeworks run firebase experiments:enable webframeworks

The process ‘/usr/local/bin/npx’ failed with exit code 1

Expected behavior

Deploys sucessfully. I have enabled the webframeworks experiment and re-tried but to no avail.

Actual behavior

Fails to deploy.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

3reactions
BolajiAyodejicommented, Nov 11, 2022

I’m experiencing the same issue. I tried adding the installation command for firebase to the action and manually enabling experiment webframeworks but it all still fails. Is there something that can be done to automatically enable this with actions?

Screenshot 2022-11-11 at 8 07 35 AM
0reactions
isherazcommented, Nov 22, 2022

I see there are 2 potential fixes submitted but @FirebaseExtended hasn’t accepted either one. Fix # 1 Fix # 2

Potential Replacement: https://github.com/w9jds/firebase-action

Read more comments on GitHub >

github_iconTop Results From Across the Web

next.js - Error when trying to deploy NextJS app on Vercel
For those who are wondering, the solution that I used is first to remove the "next/babel" from the extends array, as julio has...
Read more >
Next js App - Deploy failed to complete successfully. #2547
I have read the guide for submitting bug reports. I have done my best to include a minimal, self-contained set of instructions for...
Read more >
NEED HELP: Next js deployment failed with error - why?
I just tried to deploy a Next js application on Vercel, but I got an error and I am not sure what went...
Read more >
Trouble Deploying Next JS site - Netlify Support Forums
I read the procedure for deploying Next JS apps to Netlify. However I ran into trouble. Problem installing the plugin. Netlify App Log...
Read more >
Netlify CMS & Next.js Deploy Error Fixed. (failed due to an ...
THE ERROR : Site has not yet been deployedfailed due to an error in @netlify/plugin- nextjs pluginDeploy summaryPlugin ...
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