You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Firebase CLI deploy of next.js app failed with error for missing file client-reference-manifest.js #6135
I have uploaded the project creating from the steps below to GitHub at jdstanhope/broken-thing
[REQUIRED] Steps to reproduce
Create a React app with using the next framework using the following selections
npx create-next-app
✔ What is your project named? … XXX
✔ Would you like to use TypeScript? … No / *Yes*
✔ Would you like to use ESLint? … No / *Yes*
✔ Would you like to use Tailwind CSS? … No / *Yes*
✔ Would you like to use `src/` directory? … No / *Yes*
✔ Would you like to use App Router? (recommended) … No / *Yes*
✔ Would you like to customize the default import alias? … *No* / Yes
Setup firebase hosting for the app
firebase init hosting
/path/to/home/directory/XXX
=== Project Setup
First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.
? Please select an option: Create a new project
i If you want to create a project in a Google Cloud organization or folder, please use "firebase projects:create" instead, and return to this command when you've created the project.
? Please specify a unique project id (warning: cannot be modified afterward) [6-30 characters]:
XXX
? What would you like to call your project? (defaults to your project ID)
✔ Creating Google Cloud Platform project
✔ Adding Firebase resources to Google Cloud Platform project
🎉🎉🎉 Your Firebase project is ready! 🎉🎉🎉
Project information:
- Project ID: XXX
- Project Name: XXX
=== Hosting Setup
? Detected an existing Next.js codebase in the current directory, should we use this? Yes
? In which region would you like to host server-side content, if applicable? us-central1 (Iowa)
? Set up automatic builds and deploys with GitHub? No
i Writing configuration info to firebase.json...
i Writing project information to .firebaserc...
✔ Firebase initialization complete!
Deploy the app to firebase using
firebase deploy --only hosting
[REQUIRED] Expected behavior
App is deployed without an error.
[REQUIRED] Actual behavior
App deployment failed with an error in the firebase-debug.log with the following
[debug] [2023-07-16T18:13:25.722Z] Error: ENOENT: no such file or directory, open '/path/to/project/XXX/.next/server/client-reference-manifest.js'
Reacted by Víctor de Vierna, Yurii Serhiichuk and Swastik Patel
Hi! I just encountered this same issue. Honestly, it's my first time deploying a Next.js app to Firebase Hosting, and I'm experiencing quite a few challenges. I'll probably open an Issue about this soon. I'm not entirely sure how I fixed it, but you could try the following steps:
Attempt a clean install and downgrade your Next.js version (I'm currently using version 13.4.3).
Set up an integration between Cloud Run and Firebase Hosting.
Remove any existing manifest files (for instance, I was using next-pwa) and clear your browser's cache.
Lastly, check whether the problem arises when you access your website from Cloud Run (run.app) instead of from your custom domain (web.app). In my case, most of the issues only occur when using my custom domain (web.app), which might provide some clues for you.
Hi @jdstanhope, thanks for the detailed explanation of the issue you’re encountering! I was able to reproduce the error described when following the steps provided to reproduce the issue.
I'll notify our team about this so that they can take a look and I’ll be marking this issue as reproducible.
But @alexastrum, shouldn't this issue still be open? Downgrading is the only solution right now it seems, I use with latest 13.4.13 and faced the same issue
Activity
victorvierna commentedon Jul 16, 2023
Hi! I just encountered this same issue. Honestly, it's my first time deploying a Next.js app to Firebase Hosting, and I'm experiencing quite a few challenges. I'll probably open an Issue about this soon. I'm not entirely sure how I fixed it, but you could try the following steps:
Lastly, check whether the problem arises when you access your website from Cloud Run (run.app) instead of from your custom domain (web.app). In my case, most of the issues only occur when using my custom domain (web.app), which might provide some clues for you.
xSAVIKx commentedon Jul 17, 2023
I was debugging this issue yesterday as well. Eventually, I just downgraded all dependencies to match the Framework Tools (https://github.com/FirebaseExtended/firebase-framework-tools/blob/main/package.json)
aalej commentedon Jul 17, 2023
Hi @jdstanhope, thanks for the detailed explanation of the issue you’re encountering! I was able to reproduce the error described when following the steps provided to reproduce the issue.
I'll notify our team about this so that they can take a look and I’ll be marking this issue as reproducible.
jdstanhope commentedon Jul 17, 2023
I was able to fix the problem by downgrading from 13.4.10 to 13.4.7
amit-meena commentedon Jul 20, 2023
downgrading to 13.4.9 worked for me
thomchardon commentedon Jul 27, 2023
I encountered the same issue and was also able to deploy after downgrading to 13.4.7
aldimenur commentedon Aug 11, 2023
works deploy after downgrading to 13.4.7 for me
ritvij14 commentedon Aug 11, 2023
Downgrading to 13.4.7 worked for me too
But @alexastrum, shouldn't this issue still be open? Downgrading is the only solution right now it seems, I use with latest 13.4.13 and faced the same issue
marlier commentedon Aug 16, 2023
Installing current master of firebase-tools, this is fixed. (#6143 took care of it)
alexastrum commentedon Aug 16, 2023
Great to hear!
ktpeace commentedon Feb 16, 2024
@alexastrum I am experiencing this same issue with the following:
"firebase-tools": "^13.3.0",
"next": "^14.1.0",
I had to downgrade Next to 13.4.7, which required downgrading Node from 20 to 18, in order to get rid of this error.
This was with an entirely new project that was created with create-next-app and the instructions in https://firebase.google.com/docs/hosting/frameworks/nextjs