l0ngtrail
l0ngtrail
TTCTheo's Typesafe Cult
Created by l0ngtrail on 10/18/2023 in #questions
Long logs being cut off in Vercel
Curious if anyone has experienced this before? Making a console.log with a longer than usual line of text will result in the log being "trimmed", lack of a better term, where the beginning of the log line is cut off, only giving me the latter half of the message. I've attempted integrating with various log drains, but they all report the same as Vercel logs do.
3 replies
TTCTheo's Typesafe Cult
Created by l0ngtrail on 4/12/2023 in #questions
Next.js and GCP Cloud Functions
I've been able to deploy a Next.js application to Cloud Run and GKE, but not to Cloud Functions. I've been banging my head against this challenge for enough time now... Figured I'd ask the community, so here are my questions? Has anyone attempted to get a Next.js project running on GCP Cloud Functions? How was your experience? Were you ever successful? Did you run into any limitations? --- So far I've been able to deploy the project to a cloud function, but when navigating to the provided URL, I get 404's for everything and a blank white screen. Interestingly, the HTML for the project loads successfully, the HTML includes 404 error codes in the JSON data packet, but it is loading the initial HTML. All the 404's are for sources from the .next folder. It took me longer than I would've liked to figure out I needed to provide my own .gcloudignore file so I could override gcloud ignoring the .next folder. Downloading the source of the function, I have confirmed that the .next folder is now included. I've configured next.config.mjs to have an output of standalone and the correct basePath for the given cloud function URL. I'm currently screwing with a custom server, the first issue was that the res object from GCP did not have a setHeader method, so I polyfilled that and there were no more errors being thrown when navigating the to function URL. At this point I have a couple theories: - This is a lot more work than I signed up for, even though I think this is doable, since AWS Lambdas are doable, GCP Cloud Functions should be too, but the deeper I go, it looks like Vercel is doing a lot of "magic" to make that happen - I'm missing something stupidly small Any thoughts?
1 replies