3,399 questions
1
vote
1
answer
39
views
I'm trying to dynamically import a js file in vercel but it keeps saying file is non existant even tho it exists
The file literally exists but i keep getting this error.
Error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/interactions/selectmenus/help/index.js' imported from /var/task/handlers/...
0
votes
0
answers
60
views
MongoDB Atlas queries suddenly became 10–50× slower starting Nov 21 (no code changes, Vercel functions now running for seconds)
I am experiencing a sudden and severe slowdown in MongoDB Atlas query performance.
Starting exactly on Nov 21, every API route that interacts with MongoDB became 10–50× slower.
There were no backend ...
-1
votes
0
answers
42
views
Direct URL or refresh is getting 404 error
I am using Vite, React and Vercel.
I have come across different posts which are similar unfortunately it is not working on trying.
I am running vercel dev to test.
When I add the vercel.json file to ...
1
vote
1
answer
44
views
In NextJS 16+, can "use cache" directive work on server actions?
I am trying to cache the response of a query inside a server action file:
export async function getCachedSession(userCacheToken: string, token: string) {
"use cache";
cacheTag(`user-session:...
-1
votes
2
answers
105
views
How to set cookies from the backend on production? [closed]
I am trying to set cookies from the backend but the frontend (browser) keeps auto deleting them. This only happens on production not on localhost.
The cookie flow is this:
user clicks login with ...
0
votes
0
answers
31
views
404-error when refreshing or hand routing on deployed vercel version
Heyy,
When i refresh or handroute some page on my deployed version i always get a 404-error. The automated route in the app works as expected. On the web there are a lot of fixes that say to change ...
1
vote
0
answers
48
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 ...
1
vote
0
answers
36
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 ...
-1
votes
1
answer
54
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 ...
-4
votes
1
answer
45
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 ...
-1
votes
0
answers
77
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 ...
28
votes
14
answers
59k
views
Error: Vercel - Git author must have access to the project on Vercel to create deployments
I am developing a project with next.js. The project is kept in a secret repository in the company's github account and my github account is authorized in this repository as colabrator. The project's ...
0
votes
1
answer
94
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.
...
Best practices
0
votes
0
replies
53
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
0
answers
114
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.
...
1
vote
0
answers
68
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 ...
0
votes
0
answers
28
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 ...
0
votes
0
answers
41
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).
...
1
vote
1
answer
281
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 ...
-2
votes
2
answers
90
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 ...
59
votes
33
answers
119k
views
Why is my favicon not working in my next js app?
For some reason my favicon is not working.
I have the favicon saved as favicon.ico in the /public directory and am referencing it in the <Head> of my pages (located in the /pages directory) but ...
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 ...
4
votes
3
answers
3k
views
Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x" error on deployment
Prisma works locally and I can invoke my server actions without any problem. However, when I deploy, I get
`Unhandled Rejection: Error [PrismaClientInitializationError]: Prisma Client could not ...
2
votes
3
answers
465
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 ...
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-...
1
vote
2
answers
228
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,...
1
vote
1
answer
320
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 ...
1
vote
1
answer
85
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
1
answer
120
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
172
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 ...
0
votes
0
answers
134
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
311
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
...
61
votes
18
answers
58k
views
React-router app works in dev but not after Vercel deployment
I am trying to publish a serverless web to vercel.
I want to use react-router and this works good on my computer but when I deploy it It doesn't works
Can somebody help me?
(I want to do it without ...
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
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
46
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/...
57
votes
18
answers
113k
views
How to fix Next.js Vercel deployment module not found error
My next.js app works on my machine and was working when deployed on Vercel but now it fails when building on Vercel with the following error:
I've tried deleting node_modules and running npm install ...
8
votes
5
answers
12k
views
An interface declaring no members is equivalent to its supertype. @typescript-eslint/no-empty-object-type
I built a nextjs project, facing an error when want to deploy it to vercel.like below:
./components/ui/input.tsx
6:18 Error: An interface declaring no members is equivalent to its supertype. @...
0
votes
1
answer
96
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 ...
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 ...
5
votes
4
answers
6k
views
Vercel error | ENOENT: no such file or directory
No matter what I try, I always receive this error at the end of the deployment logs in Vercel:
Error: ENOENT: no such file or directory, lstat '/vercel/path0/.next/server/app/(main)/(pages)/...
-1
votes
3
answers
329
views
Use Wasm on Vercel Edge
I'm trying to import a .wasm file on Vercel Edge in SvelteKit. The module I'm using is @resvg/resvg-wasm.
When I try like so:
import wasmInline from '@resvg/resvg-wasm/index_bg.wasm?inline';
...
await ...
4
votes
1
answer
2k
views
Vercel Next.js app pages not indexed by Google
I built an app using Next.js, but already one month past, all pages were not indexed by Google. I tried to add sitemap and robots.txt, now they can crawl but can not be indexed by Google.
Most of ...
51
votes
28
answers
119k
views
Next JS build failing due to ''Export encountered errors on following paths"
I am encountering this build error when I deploy my next js site to vercel
15:02:38 > Build error occurred
15:02:38 Error: Export encountered errors on following paths:
15:02:38 /about/...
64
votes
10
answers
103k
views
/tmp/chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory Vercel
when I try to access my API uploaded on vercel server, I'm getting this error.
Did anyone have the same error?
When I run it locally, it works fine.
2021-02-15T19:38:59.218Z 0109b575-a2e7-478e-aefe-...
0
votes
0
answers
55
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
2
answers
110
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 ...
51
votes
11
answers
67k
views
NextJS deployed to Vercel: 404 page not found
I have a NextJS app without an integrated api that I want to deploy to Vercel. It works fine when I run it locally yarn run dev and I can also build it yarn run build without any errors. When I deploy ...
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
0
answers
80
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/...