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
3
votes
2 answers

Authentication failed against database server at `aws.connect.psdb.cloud`, the provided database credentials for `name` are not valid

Im using planestscale with prisma on a next js app that I'am trying to host on vercel but it runs on localhost without any error but as soon as I go to depolyment I count this error Authentication failed against database server at…
ibo
  • 51
  • 3
3
votes
0 answers

Cannot deploy NextJS project, working around localhost:3000

I am trying to deploy my nextJs project, through vercel deploy. However, I am running into the issue that because my code calls localhost:3000/api, the code won't make it past the npm run build, as the api is not currently running at build…
3
votes
0 answers

Getting fetch error when deploying Nextjs / TS app to Vercel

Im getting this error when I try to deploy an app using Nextjs / TS / Sanity to Vercel 18:39:44.458] Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error [18:39:44.458] TypeError: fetch…
Endugu
  • 31
  • 2
3
votes
1 answer

Cannot read properties of undefined (reading 'includes') in Reactjs

I am working with Reactjs. My code is working fine in localhost but whenever I am trying to upload on 'vercel' then I am getting following error: Cannot read properties of undefined (reading 'includes') I search and actually includes is being used…
user21481074
3
votes
1 answer

How to use eventsource (server sent events) in Next.js Serverless functions deployed on Vercel?

How can I make the below example work using serverless functions that is deployed on Vercel? I can't use edge functions as some of the dependencies (Firebase) require node.js and I couldn't find any resource on how to use eventsource in next.js…
GorvGoyl
  • 42,508
  • 29
  • 229
  • 225
3
votes
0 answers

Vercel Serverless Function crashing due to Cannot find module '/var/task/backend/node_modules/axios/dist/node/axios.cjs'

I have an issue with importing axios in Vercel Serverless Functions. The function breaks depending on the way I import axios. I have created a discussion on vercel, a github issue and also created a reproducible demo repository. I find it annoying…
cmgchess
  • 7,996
  • 37
  • 44
  • 62
3
votes
1 answer

How to modify turborepo build command to only rebuild specific Next.js application based on latest commit?

I have a question about using turborepo with Next.js. I have two applications in my repository's apps folder, called web and docs. I am deploying them separately application on Vercel, but I am facing an issue where whenever I commit something in…
Nightcrawler
  • 943
  • 1
  • 11
  • 32
3
votes
1 answer

EDGE_FUNCTION_INVOCATION_FAILED when deploying an hydrogen application in Vercel

When I am deploying my Hydrogen based Shopify application into Vercel. I am getting this error EDGE_FUNCTION_INVOCATION_FAILED when seeing on logs it tells this. When I am deploying my Hydrogen based Shopify application into Vercel. I am getting…
Jay Malde
  • 31
  • 1
3
votes
0 answers

Vercel Deployment Error: Cannot find module 'next/dist/shared/lib/router/utils/resolve-href.js'

It is my first time building a react app with NextJS frameword. The website ran ok locally with npm run build or npm run dev but got errors when I was trying to deploy it on Vercel. Here is the log: [12:51:06.189] Running build in Washington, D.C.,…
Emms555_t
  • 31
  • 2
3
votes
0 answers

Typescript errors in NextJS when deploying to Vercel but not when running build or lint locally

Firstly, there are some questions on SO with similar titles but I don't believe this is a duplicate as I thin it's a recent change to a package or vercel causing it. I upgraded some packages in an app I'm building today.. Here are the packages which…
jonhobbs
  • 26,684
  • 35
  • 115
  • 170
3
votes
1 answer

Cookie working fine on localhost but not working on vercel production

I am setting a cookie in middleware: export function middleware(req: NextRequest) { const cookie = req.cookies.get("app_id")?.value; if (cookie) return NextResponse.next(); const requestHeaders = new Headers(req.headers); const app_id:…
Inayat Ali
  • 31
  • 2
3
votes
1 answer

How to embed youtube videos in mdx files using Next.js with Nextra library?

I am using this Portfolio Starter Kit for my travel blog. The only feature I am missing there is a way to embed youtube videos into the blog post, so that they would play on-the-spot, without opening the video on youtube.com on a new page. I used…
3
votes
1 answer

Vercel Google OAuth JSON error when trying to sign in but it works in localhost, what can be the problem with vercel?

I reviewed everything, my client ID/Secret and everything is fine in my environment variables, when I click to sign in with google in localhost it works perfectly but in vercel it throws this error [GET] /api/auth/error?error=OAuthSignin Here is my…
3
votes
0 answers

Puppeteer incompatible with Vercel serverless functions? (Next 13)

I deployed an API route handler with Next.js 13 that uses Puppeteer. When I call this api route in production, I get this error message in 'Function Logs': [POST] /api/getLinkedin 00:00:21:62 2023-02-02T00:00:23.103Z …
qq1o9u81
  • 31
  • 2
3
votes
1 answer

Loading google font with Next.js in Bootstrap

I would like to load google font as described here: https://nextjs.org/docs/basic-features/font-optimization If I'm following the docs and loading like this, it's all good: import { Open_Sans } from '@next/font/google'; const openSans = Open_Sans…
levipadre
  • 569
  • 7
  • 31