yahmez_
yahmez_14mo ago

Netlify deployments failing with "Authenticate with 'npx convex dev'".

I'm currently having real trouble trying to deploy my project to Netlify. I updated the build command to be "npx convex deploy --cmd 'npm run build'", however when that command runs I get the following error:
6:10:42 PM: Analyzing and deploying source code...
6:10:42 PM: Error fetching GET https://provision.convex.dev/api/deployment/opulent-barracuda-280/team_and_project 401 Unauthorized: MissingAccessToken: An access token is required for this command.
6:10:42 PM: Authenticate with `npx convex dev`
6:10:42 PM: ​
6:10:42 PM: "build.command" failed
6:10:42 PM: ────────────────────────────────────────────────────────────────
6:10:42 PM: ​
6:10:42 PM: Error message
6:10:42 PM: Command failed with exit code 1: npx convex deploy --cmd "npm run build" (https://ntl.fyi/exit-code-1)
6:10:42 PM: ​
6:10:42 PM: Error location
6:10:42 PM: In Build command from Netlify app:
6:10:42 PM: npx convex deploy --cmd "npm run build"
6:10:42 PM: Analyzing and deploying source code...
6:10:42 PM: Error fetching GET https://provision.convex.dev/api/deployment/opulent-barracuda-280/team_and_project 401 Unauthorized: MissingAccessToken: An access token is required for this command.
6:10:42 PM: Authenticate with `npx convex dev`
6:10:42 PM: ​
6:10:42 PM: "build.command" failed
6:10:42 PM: ────────────────────────────────────────────────────────────────
6:10:42 PM: ​
6:10:42 PM: Error message
6:10:42 PM: Command failed with exit code 1: npx convex deploy --cmd "npm run build" (https://ntl.fyi/exit-code-1)
6:10:42 PM: ​
6:10:42 PM: Error location
6:10:42 PM: In Build command from Netlify app:
6:10:42 PM: npx convex deploy --cmd "npm run build"
I have added my Production Deploy Key to Netlify's .env variables too. Is there some way to authenticate that I'm missing? Is there anything I'm missing? I've followed the docs exactly. Thanks for any help!
2 Replies
yahmez_
yahmez_OP14mo ago
Managed to fix this. Looks like I forgot to add my CLERK_JWT_ISSUER_DOMAIN to my Convex dashboards Production environment variables. These issues don't seem immediately related but no longer having issues 🤷‍♂️
lee
lee14mo ago
Yes missing environment variables can cause this error. Sorry about that. The fix has landed but we haven't released it yet

Did you find this page helpful?