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
Directory output of package that is deployed #1
Comments
Hi @jthegedus, thank you for the issue.Yeah, I think this is a nice place for discussion about this. Sorry for the delay, I was trying to create a minimal reproducible example, mostly because I was curious about it too. 😝 So, till now, I was able to make it barely works locally using a proxy because Next.js assumes too much about routing (I'll probably make an issue/PR about that), and the deploy, just changing the distDir. Right now, it still fail, due to a routing problem (here I'm guessing that FCF Due the nature Router seems to be working, I guess that the default domain that Fb provides will not work normally, because it's path-based, while Next.js seems to assume a root/sub domain everywhere. EDIT: vercel/next.js#257 has some clues |
@geovanisouza92 I see. I was going to do that too 😄 Another issue I was having with my larger repo was that the next app and functions are in different nested dirs and I haven't troubleshoot to determine if that was a contributing factor or a different problem all together. vercel/next.js#1720 seems more related to that.
When the req gets to the function body it has already been parsed by bodyParser as per https://firebase.google.com/docs/functions/http-events#read_values_from_the_request Another possibly related thing I have also got working through a little playing was serving a Cloud Function from the root URL via Firebase Hosting. I will update here linking to my example repo for each problem I have encountered and discovered some random hack for, and hopefully combined with what you have done here may solve each issue of the process. |
I'm actually confirmed this
EDIT: I could make it work on FCF. Just need to make dev/prod more streamlined. (Code at https://github.com/geovanisouza92/serverless-firebase) |
I've made some progress on top of what you have developed. I've got deployment and redirecting using dynamic serving through FB Hosting working. The only issue I have now is the Route resolving for pages other than the initial load. I'll have a PR done within the next 10 hrs (AEST/UTC+10 timezone and it's early 😛 ) with these working updates. Thus far the only other issue I can think of that we may not be able to resolve until an update (to Firebase or Next.js) is having the app in a subdirectory - like this the directory structure defined here vercel/next.js#1720 |
Here's the PR geovanisouza92/serverless-firebase#1
Issues:
Sorry about the mess in the PR created by Prettier changing the |
I've updated the serverless-firebase repo PR to contain all my fixes to these issues (as far as I can tell). Thanks heaps for your help getting started. |
Hi @geovanisouza92 , thanks for this repo. I've come across vercel/next.js#2123 and wanted to ask a few questions but didn't want to further populate that thread. If this isn't an appropriate channel to discuss things let me know.
I've been trying to achieve a similar thing to what you have done here, but with Firebase Cloud Functions. I've run into a couple of issues with the packaging of my app with the
./next
folder as well as thebuild-stats.json
file (probably related to vercel/next.js#1720 ).Anyway, I was wondering what the uploaded package directory structure looked like with your solution and how you solved these issues, expanding on your comment here if possible.
Update
For future finders these are related:
firebase/firebase-tools#291
firebase/firebase-tools#376
The text was updated successfully, but these errors were encountered: