-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
As far as I understand, npx convex codegen is supposed to generate local files without pushing it to the server. I do not have any problem running it locally even though I don't have any server credentials in my env.
But on Vercel there's a check that throws an error if deploy key is not present:
convex-js/src/cli/lib/deploymentSelection.ts
Lines 582 to 596 in 0fc597a
| async function checkIfBuildEnvironmentRequiresDeploymentConfig(ctx: Context) { | |
| const buildEnvironment = getBuildEnvironment(); | |
| if (buildEnvironment) { | |
| return await ctx.crash({ | |
| exitCode: 1, | |
| errorType: "fatal", | |
| printedMessage: | |
| `${buildEnvironment} build environment detected but no Convex deployment configuration found.\n` + | |
| `Set one of:\n` + | |
| ` • ${CONVEX_DEPLOY_KEY_ENV_VAR_NAME} for Convex Cloud deployments\n` + | |
| ` • ${CONVEX_SELF_HOSTED_URL_VAR_NAME} and ${CONVEX_SELF_HOSTED_ADMIN_KEY_VAR_NAME} for self-hosted deployments\n` + | |
| `See https://docs.convex.dev/production/hosting or https://docs.convex.dev/self-hosting`, | |
| }); | |
| } | |
| } |
convex-js/src/cli/lib/envvars.ts
Lines 300 to 306 in 0fc597a
| export function getBuildEnvironment(): string | false { | |
| return process.env.VERCEL | |
| ? "Vercel" | |
| : process.env.NETLIFY | |
| ? "Netlify" | |
| : false; | |
| } |
There seems to be no way to suppress this check. Again, I believe that I don't need this key set for my purpose. I'm only trying to run a codegen for the frontend, not to release the backend
Metadata
Metadata
Assignees
Labels
No labels