convex-backend icon indicating copy to clipboard operation
convex-backend copied to clipboard

Self host project init failing: InvalidDeploymentName

Open sanketdange opened this issue 4 months ago • 3 comments

npx convex dev --once --configure=new

? Welcome to Convex! Would you like to login to your account?

Start without an account (run Convex locally)

Choose a name for your new project: sleeperpick

Error fetching POST  https://api.convex.dev/api/local_deployment/generate_admin_key 400 Bad Request: InvalidDeploymentName: Invalid local deployment name.

Tried multiple local deployment names, kept getting this 400 error. I'm running this because I believe it failed to create a convex.json file on first pass.

sanketdange avatar Aug 06 '25 19:08 sanketdange

Try wiping out your .env.local and starting over again.

mv .env.local .env.local.bak

nipunn1313 avatar Aug 06 '25 20:08 nipunn1313

Any updates on this? I'm trying to deploy changes to my self-hosted instance on Railway and I've set the required environment variables to Vercel but still get that error:

✖ Error fetching POST  https://api.convex.dev/api/deployment/url_for_key 400 Bad Request: InvalidDeploymentName: Couldn't parse deployment name railway
Error: Command "bunx convex deploy" exited with 1

Edit: I've tried both npx convex deploy --cmd 'npm run build' and npx convex deploy --cmd-url-env-var-name CUSTOM_CONVEX_URL --cmd 'npm run build' but had no success with either.

pulgueta avatar Nov 03 '25 00:11 pulgueta

why does this happen? I don't recall it ever occuring before....

abuquack avatar Nov 17 '25 15:11 abuquack