Comments (8)
from firebase-gcp-examples.
Yeah definitely, I was going to look into the details eventually ๐
Added to caveats in 061668b
If you continue to investigate and get this working, please share here!
from firebase-gcp-examples.
from firebase-gcp-examples.
Yeah, I could never get preview mode to work when I wrote that example. I haven't delved into why that is the case. When you say you can get it to work locally, is that using the Firebase Emulator, or just Next.js by itself?
from firebase-gcp-examples.
Thanks for the quick response. I was just using Next by itself.
Maybe "no preview mode" is something to add to the caveats on https://github.com/jthegedus/firebase-gcp-examples/tree/master/functions-nextjs#caveats .
from firebase-gcp-examples.
I continued investigating and I isolated the cause to the custom distDir
which we copied from the repo here. I don't know why that would be. Firebase does not seem to accept the default .next
dir so I'm still at a loss. I only know it works when deployed without a distDir
to vercel.
from firebase-gcp-examples.
I think the test cases would have to be all on Firebase. It does not surprise me it works on Vercel without any special config as their platform knows how Next.js apps are built by default.
With Firebase we're doing quite a lot of things. The distDir
config is so the Next.js server that runs on the Cloud Function can find the client-side code to the run SSR. The client-side code is in distDir
which we deploy with the server code in the Cloud Function. Firebase by default ignores .
prefixed dirs, so .next
(the default distDir
) is ignored on deployment to Cloud Functions and so the Next.js SSR server on Cloud Functions cannot find the client-side code as it doesn't get uploaded. So we need a custom distDir
. It would be odd to me that preview
mode would require the default distDir
so I think it's something else to do with Firebase.
from firebase-gcp-examples.
Oh, so you found an issue with preview mode when deployed to Vercel with a custom distDir
?
from firebase-gcp-examples.
Related Issues (20)
- Different cacheing behaviour then the expected from getStaticProps function HOT 17
- Question: Is it good to have one single function when deploying serverless? HOT 5
- Using react-modal in custom _app.js in prod build results in server crash when deployed to Firebase HOT 6
- deployment error
- Incremental Static Regeneration HOT 2
- next rebuilding the project on each request (in emulator) HOT 2
- Some functions-nextjs questions HOT 2
- add updated GraphQL server example HOT 1
- add updated Express.js example HOT 1
- add Function Group example
- add new Functions emulator to examples
- update Next.js example HOT 20
- add contributors HOT 11
- add Nuxt.js example
- TypeError: _onRequestWithOpts is not a function HOT 3
- Error in deploy HOT 30
- "Not Working" on folder/files HOT 4
- getInitialProps ? HOT 1
- All files in public/static directory does not work on dev server (yarn watch) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebase-gcp-examples.