holdenH
Convex Community9mo ago
9 replies
holden

Can't run `npx convex dev` in a nextjs app

Hi! I'm trying to add convex to an existing NextJS app hosted on vercel, following this guide: https://docs.convex.dev/quickstart/nextjs

I pnpm installed convex locally, but when I run
npx convex dev
I get this error:

✖ Vercel build environment detected but CONVEX_DEPLOY_KEY is not set. Set this environment variable to deploy from this environment. See https://docs.convex.dev/production/hosting

I tried setting a CONVEX_DEPLOY_KEY in my production env var on vercel, but the error is local and I don't think I'm supposed to add a CONVEX_DEPLOY_KEY locally?
Was this page helpful?