remotion-dev/remotion · error · TypeError
The 'project-id' argument must be provided, but is missing.
Error message
The 'project-id' argument must be provided, but is missing.
What it means
Thrown by validateProjectID() when projectID is undefined (the first check, before the string-type check). The GCP project id is required for any Cloud Run API call that authenticates and addresses resources. Failing here means the caller did not supply a project id at all.
Source
Thrown at packages/cloudrun/src/shared/validate-project-id.ts:3
export const validateProjectID = (projectID: unknown) => {
if (typeof projectID === 'undefined') {
throw new TypeError(
`The 'project-id' argument must be provided, but is missing.`,
);
}
if (typeof projectID !== 'string') {
throw new TypeError(
`The 'project-id' argument must be a string, but is ${JSON.stringify(
projectID,
)}`,
);
}
if (!projectID.match(/^[a-zA-Z][a-zA-Z0-9-]{0,48}[a-zA-Z0-9]$/g)) {
throw new Error(
'The `project-id` must match the RegExp `/^[a-zA-Z][a-zA-Z0-9-]{0,48}[a-zA-Z0-9]$/g`. This means it may only start with a letter, end with a letter or number, and contain up to 49 lowercase letters, numbers or hyphens. You passed: ' +
projectID +
'. Check for invalid characters.',
);View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Set the project id explicitly from env: projectID: process.env.GOOGLE_CLOUD_PROJECT.
- Run `gcloud config set project <your-project>` and ensure your application reads it.
- Add a startup assertion that the project id env var is present.
Example fix
// before
await deployService({ projectID: process.env.GCLOUD_PROJECT, ... }); // undefined
// after
const projectID = process.env.GOOGLE_CLOUD_PROJECT;
if (!projectID) throw new Error('GOOGLE_CLOUD_PROJECT env var must be set');
await deployService({ projectID, ... }); Defensive patterns
Strategy: type-guard
Validate before calling
import { validateProjectID } from '@remotion/cloudrun/shared';
validateProjectID(projectID); Type guard
function isProjectIDDefined(v: unknown): v is string {
return typeof v !== 'undefined';
} Try / catch
const projectID = process.env.GOOGLE_CLOUD_PROJECT;
if (typeof projectID === 'undefined') throw new Error('Set GOOGLE_CLOUD_PROJECT'); Prevention
- Always source project id from a known env var and assert it at startup.
- Run `gcloud config set project <id>` in your shell or CI.
- Add a config schema check before any Cloud Run call.
When it happens
Trigger: Calling an API with projectID omitted entirely (undefined), typically because the value was not read from env/config or was destructured away.
Common situations: The GOOGLE_CLOUD_PROJECT or GCLOUD_PROJECT env var is unset; passing an options object that omitted projectId; a config loader returned undefined.
Related errors
- The 'project-id' argument must be a string, but is ${JSON.st
- The `project-id` must match the RegExp `/^[a-zA-Z][a-zA-Z0-9
- Bucket creation is required, but no region has been passed.
- Either cloudRunUrl or serviceName must be provided
- Either cloudRunUrl or serviceName must be provided, not both
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/980d7a1463b19e8a.
Report an issue: GitHub.