Vercel Deployment Issues

default discord avatar
nclevenger
last month
2

I wanted to create a minimal payload / nextjs app without the template boilerplate, so I did

npx create-next-app@latest

then

yarn add @payloadcms/next-payload payload

and

yarn next-payload install

... the project runs fine both with

dev

and

build

+

start

... but when I deploy to vercel, I get the following error:


Error: Error: cannot find Payload config. Please create a configuration file located at the root of your current working directory called "payload.config.js" or "payload.config.ts".

I've tried duplicating the payload.config.ts file in multiple places, including the root as well as the

./payload

folder ... the

config

is being properly set (

configPath: path.resolve(__dirname, './payload/payload.config.ts'),

), and I've tried all variations of path in root, with and without the starting

./

... does anyone have any ideas?

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.