firebasenext.jsfirebase-hostingnext.js14

Firebase : Error when deploying a project


I use Firebase for my project. I have used Firebase hosting for couple of times and never had a problem. I am trying to deploy a project created by Next.js ver 14.2.3 but Firebase is telling me:

Error: Your project must be on the Blaze (pay-as-you-go) plan to complete this command. Required API artifactregistry.googleapis.com can't be enabled until the upgrade is complete. To upgrade, visit the following URL:

I have dynamic pages and authentication on my app, can I not deploy it on Firebase? I followed the items on this link in order to deploy my app: https://firebase.google.com/docs/hosting/frameworks/nextjs

NOTE: Even though it says "The latest supported Next.js version is 13.4.7.", I saw some apps deployed to Firebase hosting with the version of 14.


Solution

  • I have dynamic pages and authentication on my app, can I not deploy it on Firebase?

    You can deploy it, but only if your project is on a payment plan. That's what the error message is trying to tell you. Dynamic pages are served with Cloud Functions, which requires that you have a credit card for any billing that it might incur past the free limit. I suggest reviewing the Firebase pricing documentation for more information. See also the first step of Firebase App Hosting documentation (emphasis mine):

    If you don't already have one, create a Firebase project and make sure it has the Blaze pricing plan enabled.