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

Server configuration for Vue.js History Mode with Vercel?

I set up a very basic Vue.js app essentially using these steps. When I added the router to this project, it asked whether I wanted to use History Mode and I said yes. Now I am trying to implement the corresponding server configuration changes aka…
Ara Medina
  • 157
  • 1
  • 3
  • 7
5
votes
0 answers

Dynamic routes redirect to 404 in production on Vercel

I have a gatsby blog that I have hosted on Vercel. For my homepage, I am fetching dynamic content from Mongo Atlas. I am creating dynamic rotues in Gatsby as createPage({ path: '/microblog/:id', matchPath: '/microblog/:id', component:…
Sagar Karira
  • 669
  • 2
  • 7
  • 20
5
votes
1 answer

Different Content-Types on the same route with Serverless Next JS

I'm wondering if the following scenario is possible with serverless (deployed on Vercel) Next JS: I have a route /product/[id].tsx when you send a request with the header Accept: text/html, I would like it to go through the normal Next JS flow with…
jaxoncreed
  • 1,069
  • 2
  • 13
  • 24
5
votes
5 answers

POST multipart/form-data to Serverless Next.js API (running on Vercel / Now.sh)

I'm using a Vercel Serverless function to handle a file upload to Digital Ocean Spaces (identical API to AWS S3). However, I am running into issues handling multipart/form-data in the request handler. On the front-end I'm using fetch to post a…
Jack Wild
  • 2,072
  • 6
  • 27
  • 39
5
votes
1 answer

Vercel Serverless functions send response cookie

I want to send an 'httpOnly' cookie with my response from Vercel serverless functions. I am NOT using Express. I tried res.setHeader("Set-Cookie", `ck=${cookie_value}`); This doesn't work. How do I send cookies and put an expiry time on it?
Aritra Dattagupta
  • 760
  • 1
  • 7
  • 22
5
votes
1 answer

Can't reach static public folder with ExpressJS and Zeit Now ('now dev')

I created an ExpressJS app with handlebars templating engine and starting the app via npm start looks all good to me since all assets are being loaded. Here's my folder structure: - public - css - svg - uploads - views - layouts >…
Tommy
  • 851
  • 9
  • 24
5
votes
3 answers

Nextjs, Images in public folder not found on deploy, but are found locally

When I'm developing locally the images are found when I place the /public folder in /src/: # locally ./src/public/images/ Then when I do a deploy the images are not found. But when I place the public folder outside of src the images are found: #…
Remi
  • 4,663
  • 11
  • 49
  • 84
5
votes
0 answers

How to make a nestjs + graphql deployment to now.sh?

Problem Hi devs, I would like to see if someone can help me how to make a nestjs + graphql deployment to now.sh. I already did the build with the following command "build": "nest build", I tried to do the deployment, but when I go to the url…
Chris Michael
  • 1,557
  • 3
  • 15
  • 23
5
votes
1 answer

How to handle Postgres connection pooling in Vercel serverless functions? (“too many connections for role”)

I have a small hobby web app built on this template: https://github.com/tomsoderlund/nextjs-pwa-graphql-sql-boilerplate It uses ElephantSQL’s free tier (5 connections), runs on Zeit Now v2 serverless functions – and keeps running out of Postgres…
Tom Söderlund
  • 4,743
  • 4
  • 45
  • 67
5
votes
1 answer

Page works on initial page load, but if i refresh the page I get an 404 error with Zeit, Nextjs & now

I have recently upgraded from now v1 to v2. Everything works locally with now dev and all pages reload without any problems. However when I push to prod with now --prod and navigate to a page everything works as expected, however if I reload the…
Jamie Hutber
  • 26,790
  • 46
  • 179
  • 291
5
votes
1 answer

Nest.js deployment to now.sh

I am currently trying to deploy my demo application to zeit now.sh. In documentation I have found how I can deploy Node.js and Express.js application. But example that I am referring expects as parameter js file with server initialization, and by…
Ivan Vasiljevic
  • 5,478
  • 2
  • 30
  • 35
4
votes
1 answer

How to use dynamic head in Next js 13?

before next js 13 we used to do dynamic head as an import. but in Next JS 13 they introduced the head.js class. this works when using a static page, but when loading a dynamic how can we change the title and desc in the head? i directly imported the…
Mohammed Bekele
  • 727
  • 1
  • 9
  • 25
4
votes
1 answer

Sveltekit loses connection to MongoDB when deployed to Vercel

I've recently deployed a small SvelteKit web app to Vercel, using the @sveltejs/adapter-vercel adapter in the svelte.config.js like this: import adapter from '@sveltejs/adapter-vercel'; const config = { kit: { adapter: adapter(), …
gurumaxi
  • 365
  • 2
  • 11
4
votes
1 answer

Data is not being updated (always getting the same result) after the project is deployed

I created an api endpoint in my Next.js v13.2 application that fetches data from a database. app/api/someData This was working well until I deployed it on Vercel. I think the problem is that the route is being cached and, as a result, returns the…
lool
  • 345
  • 1
  • 6
  • 11
4
votes
1 answer

Vercel serving stale version of static files, after rebuild

I have come across a seemingly significant issue with the Vercel cache. Background I have an app built with Next.js 13, hosted on Vercel The app pulls data from Contentful, via GraphQL fetches The app's pages are statically generated (screen shot…
Magnus
  • 6,791
  • 8
  • 53
  • 84