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

Environment variables with Vite React-ts and Vercel

I'm using ViteJS with React-ts template and i want to make deploy in Vercel using environment variables, locally i use "import.meta.env.VITE_XXX" and it works with my file .env, but when the application has ben deployed in the Vercel it doesn't…
3
votes
1 answer

Nextjs getStaticPaths url params build slash as %2F in vercel production environment

I am implementing nextjs dynamic route for my static documentation page. It works perfectly in local, and it compiled successfully but it doesn't work with production URL. I think my current code getStaticPaths url handling is something strange and…
husky
  • 831
  • 3
  • 10
  • 24
3
votes
1 answer

My on demand revalidation api call takes too long that it gets timed out on Vercel

I made a kentcdodds inspired blog where I use Github as my CMS I store my blog content in the same repository as the code in mdx format, I made a workflow that when something changes in that directory I send the names of the files changed to the…
SandStone
  • 161
  • 1
  • 7
3
votes
1 answer

Why can't connect to my Database on Vercel using Next JS and a MySQL cloud service?

I have a Vercel URL for my project and it works at least on the front end. I have created a cloudclusters MySQL database instance and uploaded my DB and Tables and can access them in Workbench. It will not seem to connect on my Next JS website. My…
MomasVII
  • 4,641
  • 5
  • 35
  • 52
3
votes
1 answer

Vercel deployment: Error occurred prerendering page "/" TypeError: fetch failed

Yesterday I deployed my project (using Sanity.io) to Vercel and no issue. Today I edited my code and want to deploy the new version with this commands: vercel build vercel deploy --prebuilt vercel --prod The last command gave me an error…
Théo
  • 33
  • 4
3
votes
1 answer

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@sveltejs/kit' imported from /var/task/.svelte-kit/vercel-tmp/index.js

I'm trying to deploy a sveltekit app to vercel with adapter-vercel. It's just a basic SPA app. I've created a sveltekit app with: npm create svelte@latest my-app package.json "scripts": { "dev": "vite dev", "build": "vite build", …
sander
  • 1,426
  • 4
  • 19
  • 46
3
votes
1 answer

Vercel Error: ENOENT no such file or directory

I'm building a static blog using Nextjs 13 and deploying it on Vercel. I builded and started the project locally and everything was working, but on Vercel I got this error: ERROR Error: ENOENT: no such file or directory, open 'posts/second.md' …
Samuele1818
  • 336
  • 4
  • 11
3
votes
2 answers

Difference between vercel.json and next.config.js for rewrites?

You can put your rewrite config in a file called vercel.json, and also the next.config.js file. Is there a difference between the two, are there any advantages in using one over the other? (assuming you are hosting with Vercel) Does one config take…
michael reas
  • 133
  • 6
3
votes
0 answers

Setup Vercel CLI to work with a staging environememt

I'm trying to get Vercel to work with our CircleCI pipeline (we want to run tests beforehand). We WANT to have 2 environments: stagging - on commits to main we want to have the changing reflected on our staging env prod - on commits to prod we want…
Martin
  • 1,159
  • 10
  • 34
3
votes
0 answers

Vercel production build returning 405 status code for POST and GET

I am trying to build a website for an online experiment at the university. For this purpose, I was introduced to the MERN stack a couple of months ago and I have more or less finished the website locally. Now, whenever I switch to the production…
3
votes
5 answers

File path in NextJS api route not resolving

I'm trying to resolve a file path in NextJS. I understand that API routes are working a little bit differently when deployed to Vercel. In order to create a correct path to the file I assumed I had to do this: const svg = fs.readFileSync( …
supersize
  • 13,764
  • 18
  • 74
  • 133
3
votes
0 answers

vercel: how to deploy project via cli with project name as paremeter

I wish to deploy project with project name set via vercel cli. How it works now: Pretend that I have app myproject in Vercel cloud. Pretend that localy I have folder superproject, and inside it I run: npx vercel deploy --prod --yes Vercel…
pbaranski
  • 22,778
  • 19
  • 100
  • 117
3
votes
1 answer

404 Page not found Vercel Deployment - using dynamic routing in Next JS

I am making a full-stack web-application using Next JS where I allow the user to create and manage letters (applications) based on pre-defined templates. So when the user successfully creates an application, it is sent to the database (POSTGRES)…
Sounav Saha
  • 75
  • 1
  • 7
3
votes
1 answer

NextJs + supabase not deploying supabaseUrl is required

i'm trying to deploy my project but i keep getting this error saying that supabaseUrl is required. I'm getting this error This is my supabaseClient.js import { createClient } from "@supabase/supabase-js"; const supabaseUrl =…
José Carlos
  • 626
  • 3
  • 23
3
votes
3 answers

Next.js public/images not showing in vercel production build

I have a Next.js app I am deploying to Vercel. When I dev locally I see the images, but when I push to Vercel and check the site, the images have a 404. I have a public/images folder where I have the images right in the folder, and the code I…