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
11
votes
9 answers

Vercel Deployment Error: Command "npm run build" exited with 1

I am developing a React app in VS Code. I used create-react-app for setup. I can run the project without any problem with npm start. When I tried to publish the project with Vercel I got errors: Already tried deleting node_modules and npm install…
Alper Tellioğlu
  • 123
  • 1
  • 1
  • 5
10
votes
2 answers

Vercel: ERROR Error: The package "esbuild-linux-64" could not be found, and is needed by esbuild

Hope you all are having a good time. I am working on a simple NextJs application where I want to have multiple subdomains in it. I am deploying the application on vercel. What my application does is it have a simple textarea where you write MDX, you…
zainsci
  • 209
  • 2
  • 8
10
votes
1 answer

Why is importing bcrypt causing a "Cannot find module napi-v3/bcrypt_lib.node" error?

Using the Javascript bcrypt package, I get this server-side runtime import error only when deployed (on Vercel.com using Next.js /api routes which are AWS Lambdas under the hood): 41f80 ERROR Error: Cannot find module…
Kaelin
  • 381
  • 2
  • 9
10
votes
2 answers

Vite.js React Build Not Redirecting On Netlify And Vercel

I made a react build with vite.js. When building for production and testing on local host all is working fine. But when i deploy to Netlify or vercel routes that i created with react-router are not accessible via entering their url directly, but…
Shantiscrip
  • 363
  • 3
  • 8
10
votes
1 answer

Next.js: How can I use getStaticProps/getStaticPaths for sites with multiple domains/hostnames?

I’m building a site with the structure https://[sub.domain.ext]/[language]/articles/[slug], however it will have different content on different domains (different hostnames). A typical use case of this would be different subdomains for different…
Tom Söderlund
  • 4,743
  • 4
  • 45
  • 67
10
votes
1 answer

Python Serverless Function Vercel - Next.js

I found out that I could use Python to create a serverless function inside a Next.js project. Once deployed to Vercel, it will get converted into a serverless function. I went through the docs and found a simple example that outputs the date: from…
Juan Marco
  • 3,081
  • 2
  • 28
  • 32
9
votes
1 answer

Next.js getServerSideProps (throw Error) results in 404 instead of 500

I have very basic setup, of getServerSideProps with Sentry error logging in Production on Vercel export const getServerSideProps = async () => { // some api call if(error) { throw new Error("Something went wrong") } return { props: { …
duskandawn
  • 646
  • 1
  • 10
  • 19
9
votes
3 answers

Failed to parse private key: Error: Invalid PEM formatted message

I am trying to deploy a NEXT JS app that uses firebase-admin on Vercel. import * as firebaseAdmin from 'firebase-admin'; import firebase from 'firebase/app'; if (!firebaseAdmin.apps.length) { firebaseAdmin.initializeApp({ credential:…
wick3d
  • 1,164
  • 14
  • 41
9
votes
1 answer

How to deploy NextJS on AWS, the same way Vercel does?

I want to deploy NextJS on AWS using AWS CDK for a POC and was looking at options. In the NextJS docs, it says that we can just create an instance and run npm run build && npm start, it will start the service for us. However, this is not the most…
vighnesh153
  • 4,354
  • 2
  • 13
  • 27
9
votes
2 answers

Vercel and Nextjs: redirect subdomain to path dynamically

I have a nextjs project with a :client param which represents a client, like this: domain.com/:client And I have multiple clients... so I need to do this rewrite: :client.domain.com -> domain.com/:client For example for clients: google.domain.com…
Diego Ulloa
  • 500
  • 8
  • 19
9
votes
0 answers

Cookies is not saved in the browser even when server sends set-cookie using VERCEL

I have two VERCEL servers running. One is for server and second for client. Server is running NODE -> express -> express-sessions. Client is running Svelte with fetch api. My server is setting cookies right and sending them but my browser is not…
Lumca
  • 163
  • 8
9
votes
1 answer

Vercel Serverless function with nuxtjs ECONNRESET Client network socket disconnected before secure TLS connection was established

so i'm having this problem on a nuxt implementation with vercel, at random moments the site doesn't load and throws a 502 http error this is the stacktrace of vercel: ERROR Unhandled Promise Rejection …
juan
  • 91
  • 3
9
votes
3 answers

How do I add Google Application Credentials/Secret to Vercel Deployment?

I am using Vercel Deployments with a NextJS app. Deployments are automatically run when I push to master, but I don't want to store keys in GitHub. My serverless functions are reliant on my database. When run locally, I can simply use Google's…
learningAngular
  • 231
  • 3
  • 14
9
votes
4 answers

Vercel creates new DB connection for every request

I'm working on a new website, and although things were working well as we developed locally we've run into an issue when we tried to deploy on Vercel. The app uses the Sapper framework for both the pages and an API, and a database in MongoDB Atlas…
Kamil Drakari
  • 201
  • 4
  • 5
9
votes
1 answer

How to get the RAW Body using serverless functions?

I am migrating from Express to serverless functions on Zeit Now. The Stripe webhook docs asks for a raw body request, When using Express I could get it via bodyParser, but how does it work on serverless functions? How can I receive the body in a…
Horai Nuri
  • 5,358
  • 16
  • 75
  • 127