All Questions
3,405 questions
0
votes
0
answers
72
views
Vercel build error: “Cannot find module '../lightningcss.linux-x64-gnu.node'” when building (Vite + Tailwind + React) project [closed]
I’m trying to deploy my personal website to Vercel using Vite + React + Tailwind CSS. The project builds and runs fine locally (npm run build works without errors), but the Vercel build fails with the ...
-9
votes
0
answers
47
views
How can i link stripe so my appnis fully functional? [closed]
I have built an app through from google ai studio, put it in github , hosting on vercel and want to add stripe for payments. I've add keys to vecel but my domain won't load to sripe. I need help so my ...
1
vote
0
answers
44
views
Getting a prerender error that a file is consuming server side logic but its client side
I'm using the entry file at the root of my app as a data layer, for redirects depending on session, which I'm retrieving using getServerSession. If at a point no session exists, user should be ...
-4
votes
1
answer
61
views
Vercel live site not updating UI changes after successful GitHub push and redeploy [closed]
I am building a Habit Tracker application using React (Vite) and Tailwind CSS, deployed on Vercel.
The Problem: I recently updated a component (HabitList.tsx) to fix a UI issue where an input field ...
0
votes
0
answers
26
views
Endpoint fails when trigger automatically by cron job but succeeds when cron job is triggered manually
I have a serverless function running on Nextjs, hosted on Vercel.
The database is hosted on Heroku. I use EasyCron as a provider for the cron jobs.
Recently, there was an upgrade on the database and ...
1
vote
0
answers
30
views
Bun + Express on Vercel: How to Modularize Routes from Separate Files?
I'm deploying a Bun + Express application to Vercel. Locally, my Express app works perfectly with routes defined in separate files and imported into index.ts. However, on Vercel, the deployment ...
-4
votes
1
answer
43
views
Streaming text for CURL with SolidJS & Vercel
Is there any way to stream text when my site gets CURL'd, similar to https://malted.dev/ ? I've tried using Vercel's functions, but I could not get it to return anything other than the HTML. If ...
0
votes
0
answers
23
views
MERN Project Backend Not Loading Data on Vercel Deployment
I’m trying to deploy my full MERN project (frontend + backend) on Vercel. The frontend works fine, but the backend is not loading data. I keep getting this error in the console:
GET https://cutomer-...
0
votes
1
answer
48
views
In Next js project Error: <Html> should not be imported outside of pages/_document
I have having issues in vercel and render deployment, but i have checked all instances but not happening i have check other answers also but it is not working. Are there any things which I can do for ...
-1
votes
0
answers
75
views
Why my prisma seed.ts does not work for path "../app/generated/prisma"
import{ PrismaClient }from '../app/generated/prisma'
I see red underline for this line in my vs code and also having a error "module can be found" something like that in my terminal.
But it ...
1
vote
0
answers
62
views
Module not found: Can't resolve # when using turborepo with nextjs and `imports`
I have a monorepo built with turborepo. Packages compilation works fine but there is an error when I try to build entire monorepo including my nextjs app. This is my package.json and tsconfig.ts of my ...
Best practices
0
votes
0
replies
52
views
Why does my Next.js app’s performance drop significantly when using dynamic routes with large datasets and server-side rendering (SSR)?
I'm working on a Next.js 14 app with several dynamic routes (e.g., /product/[id]) that render product details from a large dataset (around 50k+ records) stored in PostgreSQL.
I'm using ...
0
votes
1
answer
80
views
Vercel serverless functions not working during deployment for Nuxt4 SSR Project, only serving frontend
I’m trying to deploy a Nuxt 4 full-stack app to Vercel, and while the frontend builds and loads correctly, all my backend API routes fail, and there is no response from the composables or server apis.
...
0
votes
0
answers
37
views
How to fix DrizzleQueryError when deploying Payload Website Starter one click deployment?
I am getting this below error when using one click vercel payload deployment.
https://vercel.com/templates/next.js/payload-website-starter
All the connection strings are added properly(automatically).
...
0
votes
0
answers
113
views
How to avoid double login when using NextAuth (GitHub provider) with Giscus comment system?
We’re a small student-led open-source learning platform: "involutionhell" built by volunteers in our spare time. Our website uses NextAuth.js with a GitHub provider for authentication.
...
0
votes
0
answers
43
views
Monorepo deployment issue on Vercel – shared package @repo/ui not resolved
I'm trying to deploy our homepage repo (apps/nd-web-home) to Vercel.
Locally: the build works fine.
On Vercel: the deploy fails with Module not found: Can't resolve '@repo/ui'.
Our setup:
/packages/...
0
votes
0
answers
53
views
Connecting Java backend(Servlets) to Vercel frontend(fetch API). Cors Error
So basically I have put up my backend on Render web Service (on tomcat) and my frontend(Nextjs) is on Vercel. I have put up a Filter for Cors Policy to intercept all policies and as well as handled ...
-2
votes
2
answers
89
views
Uncaught ReferenceError: require is not defined, in my Vercel app
Problem
I have a React app using Leaflet.js (v.1.9.0) and I host it in Vercel. Building works OK, but when visiting my app online logs this message in console:
Uncaught ReferenceError: require is not ...
0
votes
0
answers
125
views
Next.js (Vercel) API route loses Authorization header in production — works in dev
I have a Next.js app on Vercel with a custom /api/mobile-login that returns a JWT.
My React Native app saves the token and calls /api/mobile-current-user with a Bearer header.
Bearer Header:
const ...
0
votes
1
answer
95
views
How to fix 404 error when deploying Node.js backend on Vercel with Vue frontend on Netlify?
I have split my Vue.js project into two parts:
The frontend is a Vue app, which I successfully deployed to Netlify, and it works fine.
The backend is a simple Node.js + Express server that I want to ...
1
vote
0
answers
153
views
Better Auth cookies not saving in frontend after sign-in on Vercel deployment with Express/MongoDB
I'm building a full-stack application using Bun, Express, Node.js, MongoDB, and Better Auth for authentication. The app works perfectly on localhost, but after deploying to Vercel, cookies are not ...
1
vote
1
answer
279
views
FastAPI route works locally with `/` but not on Vercel (and vice versa)
I have a FastAPI + Next.js project deployed on Vercel.
Locally everything works, but on Vercel some routes break depending on whether I use a trailing slash in the route definition.
For example, in my ...
1
vote
1
answer
100
views
Firebase Admin SDK db object is invalid in Vercel API Route ("Expected first argument to collection...")
I have a Next.js application on Vercel. My API route fails when calling Firestore's doc() function, but only when deployed to Vercel or when running the production build locally. The dev server (npm ...
0
votes
0
answers
44
views
Vercel deployment of Next.js app with custom 'rewrites' in vercel.json results in 404 errors on all routes
I have a monorepo project with a Flask backend (deployed separately) and a Next.js frontend located in a frontend directory. I'm trying to deploy only the frontend on Vercel.
Project Structure:
text
...
1
vote
1
answer
76
views
Next.js host based rewrite did not trigger on the root path
I want my subdomain sub.example.com to render the page example.com/brand without changing the URL.
Examples
sub.example.com/ should render example.com/brand
sub.example.com/work should render example....
0
votes
0
answers
41
views
How to specify path to custom python modules when deploying on Vercel
when deploying the project on Vercel, an error occurs:
File "/var/task/api/main.py", line 2, in <module>
from config import app, db
ModuleNotFoundError: No module named 'config'
i ...
1
vote
2
answers
220
views
TailwindCSS v4 styles not showing after Vite/Astro build on Vercel deploy
I am trying to deploy an Astro.js site on Vercel that utilizes TailwindCSS v4:
tailwind.config.js
/** @type {import('tailwindcss').Config} */
export default {
purge: ["./src/pages/**/*.{js,ts,...
0
votes
1
answer
249
views
Getting Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again
This is the error it's giving when I run npm run build:
ml@M-----MacBook-Air skyfold.dev % npm run build
> [email protected] build
> next build
▲ Next.js 15.4.6
- Environments: .env
...
0
votes
0
answers
54
views
node-html-to-image on Vercel serverless function
According to this Vercel page it seems like using a Vercel function to run Puppeteer should be doable, but not matter what I do, I end up with Unhandled Rejection: Error: Unable to get browser page. ...
0
votes
0
answers
23
views
Vercel deployment fails due to typecheck for Chakra-UI custom recipe variant
The problem I am running into is that the local typecheck is OK, but the Vercel deployment typecheck is failing:
"@chakra-ui/react": "^3.25.0",
"@emotion/react": "^...
0
votes
1
answer
152
views
Middleware function from Auth.js exceeds Vercel 1 MB limit
My application uses Auth.js (NextAuth.js v5) to authenticate. In local, it works fine, but when deploying to Vercel problems arise with the "middleware function size". I tried to "...
0
votes
0
answers
55
views
Nextjs 15 app, all dynamic routes return 404 when deployed
I have a nextjs (15.3.1) application entirely based on dynamic routes, this is the output when I build it:
Route (app) Size First Load JS
┌ ○ / ...
0
votes
1
answer
45
views
Cloudinary error "Must supply sdk_semver" only on Vercel deployment
I'm using Cloudinary SDK v2 in a Next.js (Node.js) API route. When running locally it works fine, but after deploying to Vercel I get this error:
Must supply sdk_semver
I searched extensively but ...
0
votes
1
answer
117
views
Cannot see my API call on frontend console?
fetch('https://localhost:7077/api/test/users')
.then(res => res.json())
.then(data => console.log('Users:', data))
.catch(err => console.error('Error:', err));
Error:
Promise {<...
1
vote
0
answers
35
views
UnknownAction error in production (Vercel SSR with Astro)
I'm building an Astro site using auth-astro with Google as a provider. Everything works perfectly in local development, including sign-in and callback flows. However, in production (Vercel SSR), when ...
0
votes
0
answers
52
views
Session token/headers not detected in production (Vercel)
When deployed, it fails
Cookie validation
Bypass Vercel firewall rules for API routes
even though cookie + header is seen from the browser
middleware.ts
import { NextResponse } from 'next/server';
...
0
votes
0
answers
79
views
Getting error in deploying on render and error in node_module how can i fix it?
I'm deploying a Node.js backend using Mongoose, and I'm getting the following error during build on Vercel:
Error: Cannot find module './bulkWriteResult'
Require stack:
- /vercel/path0/backend/...
0
votes
0
answers
44
views
404 for NEXT JS dynamic routes on Vercel production deployment
I am stuck on a frustrating behavior on my next js app which I recently deployed to vercel production environment. Basically all pages are loading except my SSR page that uses dynamic routes.
Also ...
2
votes
1
answer
225
views
Clerk authentication works on localhost but not on Vercel deployment (sign-in redirect issue) [closed]
I'm currently working on a project where I'm using Clerk for authentication in a Next.js application.
Everything works perfectly when I run the app on localhost. I can sign in, and redirection works ...
0
votes
0
answers
70
views
if i wrote"npm run build" command in package.json, what should i write in build command in project setting of vercel's framework setting?
i am using express + typescript, and deploying with vercel.
"scripts": {
"start": "nodemon --exec npx tsx src/app.ts",
"build": "tsc && tsc-...
1
vote
0
answers
62
views
How to get DNS verification records for verify.domain.tld?
I'm using the Vercel SDK in a serverless function (Edge/Deno) to programmatically add custom domains to a Vercel project. The domain we actually add is a subdomain like verify.domain.tld (not the root ...
0
votes
0
answers
85
views
Vercel Deployment: White Screen with vercel.json, but 404 on Routes Without It
I'm having a persistent issue deploying a Vite + React (TypeScript) application with a Node.js (Express) backend to Vercel, and I'm caught in a frustrating loop.
The Tech Stack:
Frontend: Vite, React,...
2
votes
3
answers
446
views
Typescript Errors from `node_modules` in Vercel CLI's logs
In a Vercel serverless project, I am getting hundreds of typescript errors coming from my node_modules directory.
The serverless app is part of a Turborepos monorepos (apps/serverless);
These errors ...
1
vote
1
answer
300
views
How do I configure Vercel to treat a compiled index.js as a serverless function instead of a static file?
I'm working on a Vercel-hosted monorepo with the following setup:
index.ts (using the Hono framework with hono/vercel) is compiled using tsup into dist/functions/index.js
Static assets are built ...
0
votes
2
answers
80
views
Express.js backend returns 404 on Vercel deployment
I'm trying to deploy an Express.js + MongoDB + Mongoose backend to Vercel, but I’m getting this error when accessing any route (including /api/v1):
404: NOT_FOUND
Code: NOT_FOUND
Project structure:
...
0
votes
1
answer
77
views
Unresolvable Silent Crash with handleAuth on Vercel (Next.js App Router)
I am facing a challenging debugging journey and its solution for an issue with @auth0/nextjs-auth0 on Vercel with the Next.js App Router.
Core Framework & Auth Libraries:
Next.js: ^14.2.15
React: ...
0
votes
0
answers
85
views
Yarn workspace hoisting works on local but not in deployment
I am using Next.js (Server Side Rendering). When running the workspace locally, a package that is defined in the root package.json but used in a sub-directory works. However when deployed, a module ...
0
votes
0
answers
75
views
How to only trigger a redeploy when there are changes in a specific folder on Vercel
I'm using Vercel to build a static web page for one of my coding projects. It's linked up to my GitHub repo, so it's automatically rebuilding every time I push any changes to my repo. Since my project ...
0
votes
0
answers
35
views
Vercel & GitHub Pages Deployment Images Issue
I've built a website with Vue (a Vue/Vite project), and while I was developing, I encountered no issues with how the images were displayed.
However, upon deployment to both Vercel and Github Pages, ...
0
votes
2
answers
109
views
Vercel build fails with TypeScript error 'params' is a Promise on Next.js 15 Server Component
I am building a website using Next.js 15.3.3, React 19, and Sanity.io for content. Everything works perfectly in my local development environment (next dev).
However, when I deploy to Vercel, the ...