New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CF3v2 deploy on fresh project] TypeError: Cannot read properties of undefined (reading 'service') #5157
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Im running into the same issue |
I am also facing the same issue. |
It seems this is not isolated to web frameworks but appears to be a gen2 function deploy to a fresh project. A race condition in permission enablement seems likely, we're investigating. There is a work around, delete the broken Cloud Function (for SSR + Image Optimization) in the Google Cloud Console. It is left in a bad state that cannot be recovered w/the current firebase-tools. After manual removal, your next deploy should work. |
@jamesdaniels Thank you for investigating, I hope it will be resolved soon. |
The workaround worked for us. But we had to do the deploy twice. On first the SSR was returning 404, the second deploy worked as expected. |
@petrvecera |
When I created and deployed a new Next.js app separately, it took a few minutes to deploy the SSR function of Cloud Functions, but I was able to deploy it I don't know if it's because of Next.js 13, // Only error in first one compiler (client) once
if (isClient) {
if (!hasReactRoot) {
throw new Error("Next.js requires React 18.2.0 to be installed.");
}
} /node_modules/next/dist/build/webpack-config.js I'm using React 18.12.0 properly, but I think it's probably a problem with Next.js settings. |
I have a work around with the Next 13 / React 18 bug in progress here #5175 |
@jamesdaniels |
I'm going to close this as duplicate of #4800. Feel free to re-open if I'm mistaken. |
I am unable to deploy brand new NextJS app as per https://firebase.google.com/docs/hosting/nextjs
I am getting "firebase" errors.
[REQUIRED] Environment info
firebase-tools: 11.15.0
Platform: Debian ( linux)
node: 16.18.2
[REQUIRED] Steps to reproduce
My steps:
Prepare project:
Repo:
npm create-next-app
npm i firebase-tools
firebase experiments:enable webframeworks
firebase login
firebase init hosting
- select the projectfirebase deploy
[REQUIRED] Expected behavior
Project is deployed.
[REQUIRED] Actual behavior
On the first run i get:
On the second run:
I tried testing this both on local machine - M1 Mac - I run into weird nodejs errors.
Next I tried GitHub Codespaces. Repo is here https://github.com/vsb-js/next-fb-hosting
I am not sure what else I am getting wrong. I am sorry if this is my mistake. If anyone has boilerplate repo, where you just specify your FB project - that would be very helpful. Thank you
firebase-debug.log
The text was updated successfully, but these errors were encountered: