Questions tagged [vercel]

Vercel is the platform for frontend developers. Vercel has zero-configuration support for 35+ frontend frameworks and integrates with your headless content, commerce, or database of choice.

Vercel is the platform for frontend developers, providing the speed and reliability innovators need to create at the moment of inspiration.

They enable teams to iterate quickly and develop, preview, and ship delightful user experiences. Vercel has zero-configuration support for 35+ frontend frameworks and integrates with your headless content, commerce, or database of choice.

2631 questions
7
votes
0 answers

Get notified a vercel build and/or deployment has completed

I am using a deploy hook from my headless CMS (prismic) to kick off a build and deploy on my vercel hosted statically rendered nextJS site. The build time is variable, and I need to run a script after a successful build/deploy, which sends an email…
Adam Diament
  • 4,290
  • 3
  • 34
  • 55
7
votes
4 answers

Vercel next.js environment variable not working

I'm using google maps in a Next.js project and everything's working locally. The google maps secret key is being stored in next.config.js which I access in the code through process.env.NEXT_PUBLIC_GOOGLEMAPS When I deployed the project to Vercel, I…
Allen Wu
  • 165
  • 1
  • 2
  • 10
7
votes
1 answer

use SWR with depending request data

I'm trying to use SWR to fetch list of users connected to the logged in user id provided by a custom hook. I can't put useSWR inside either useCallback or useEffect or if (loggedInAdvisor) { ... }... Can't figure out how to do it. export const…
olefrank
  • 6,452
  • 14
  • 65
  • 90
7
votes
2 answers

Vercel next.js deployment function logs without third party

Been toying around with Vercel for deployment and really like the simplicity. Maybe I am not seeing something here, but how can I get visibility into a function without piping to a third-party? I've got this pages/api/hello.js-api export default…
Fabian Bosler
  • 2,310
  • 2
  • 29
  • 49
7
votes
2 answers

Pages with `getServerSideProps` can not be exported

I think i am making some kind of confusion here. According to the documentation, if i want Server Side Rendering (SSR) for the page i export the async function: getServerSideProps But if i do that i can't build the project for running either…
MiguelSlv
  • 14,067
  • 15
  • 102
  • 169
7
votes
1 answer

Typescript compilation fails (in Docker) when NODE_ENV=production

So I have a create-react-app-ts app that I would like to Dockerize and host on Zeit Now. Everything works fine locally, running yarn tsc and react-scripts-ts build works great. Creating the Docker image also works great from the following…
jhm
  • 4,379
  • 5
  • 33
  • 49
6
votes
3 answers

Why Vercel Web vitals is not loading for my Astro Project?

I created a landing page using Astro with Tailwind CSS. And it is currently hosted on Vercel. I wanted to try out the analytics service provided by Vercel. I have been able to avail the Audience analytics service provided by Vercel. However, I…
paradus-hex
  • 221
  • 2
  • 6
6
votes
1 answer

How to debug a Next.js hydration error that only shows up in production deployment

I have a nextjs app that gets deployed to Vercel. When running next dev, I have no hydration errors. But when deploying to Vercel, the production build shows several minified react errors. My problem: I don't know how to debug them. Since the react…
florian norbert bepunkt
  • 2,099
  • 1
  • 21
  • 32
6
votes
1 answer

Can Turbopack be used outside NextJs?

Since it's apparently very fast, It would be nice if it could be used outside for multiple projects like Vite. Couldn't find much information about it on their website https://turbo.build/pack Went to https://github.com/vercel/turbo but couldn't…
renegadevi
  • 73
  • 5
6
votes
1 answer

pino-datadog-transport with Next.js on Vercel

I'm trying to migrate a Next.js project running on Vercel from "pino-datadog": "2.0.2", "pino-multi-stream": "6.0.0", to "pino": "8.4.2", "pino-datadog-transport": "1.2.2", and I copy the setup from the pino-datadog-transport's…
simonauner
  • 1,021
  • 1
  • 8
  • 10
6
votes
0 answers

Use fileSystem on an API Route with NextJS deployed on Vercel

I need to use fileStystem methods as readdirSync on an API Route in NextJS. It works locally but when deployed on Vercel, the request responds with a 500 status code. This is Vercel's Funcion Logs: catch Error: ENOENT: no such file or directory,…
JMRBDev
  • 187
  • 12
6
votes
0 answers

github workflow only on deployment_status AND specific branch

Similar tho this question How to run Github Actions with the 'deployment_status' kitty and only on the QAS branch? I want to execute a workflow only on a specific branch but combined with the deployment_status trigger. So I want to execute my end to…
Tobi
  • 674
  • 5
  • 20
6
votes
0 answers

How to use GitHub Releases with Vercel?

I am working on an ecommerce site with Next.js and want to deploy it to Vercel. I have seen that Vercel uses the Deploy-Preview-Ship model (DPS) and while I am not sure if this is something that goes against that I was wondering if there is a way to…
Max
  • 73
  • 3
6
votes
1 answer

Why is my NextJS performace score so inconsistent in web.dev?

We are seeing very inconsistent performance scores in web.dev with our NextJS application. At first, we had around 30 performance so we started optimising. Now we are at around 90 with a margin of 5 locally in Lighthouse. However, when we are…
Thomstaal
  • 83
  • 6
6
votes
1 answer

Cannot find module '@next/env' Next-js Vercel

I have developed a Next.js app that works fine on my local machine. I am trying to deploy my app on Vercel but it keeps throwing me the error Cannot find module '@next/env' as shown here. I think it's because of the next-sitemap package. I have…