FlowiseAI/Flowise · error · Error
GOOGLE_CLOUD_STORAGE_BUCKET_NAME env variable is required
Error message
GOOGLE_CLOUD_STORAGE_BUCKET_NAME env variable is required
What it means
Thrown by GCSStorageProvider.initGCSConfig when GOOGLE_CLOUD_STORAGE_BUCKET_NAME is not set. The bucket name is mandatory; project ID and key file are optional only when Application Default Credentials are available, but a target bucket must always be named.
Source
Thrown at packages/components/src/storage/GCSStorageProvider.ts:37
this.bucket = config.bucket
this.bucketName = config.bucketName
this.projectId = config.projectId
this.keyFilename = config.keyFilename
}
private initGCSConfig(): {
bucket: Bucket
bucketName: string
projectId: string | undefined
keyFilename: string | undefined
} {
const keyFilename = process.env.GOOGLE_CLOUD_STORAGE_CREDENTIAL
const projectId = process.env.GOOGLE_CLOUD_STORAGE_PROJ_ID
const bucketName = process.env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME
if (!bucketName) {
throw new Error('GOOGLE_CLOUD_STORAGE_BUCKET_NAME env variable is required')
}
const storageConfig = {
...(keyFilename ? { keyFilename } : {}),
...(projectId ? { projectId } : {})
}
const storage = new Storage(storageConfig)
const bucket = storage.bucket(bucketName)
return { bucket, bucketName, projectId, keyFilename }
}
getStorageType(): string {
return 'gcs'
}
getConfig(): any {
return {View on GitHub (pinned to abe4a8601a)
Solutions
- Set GOOGLE_CLOUD_STORAGE_BUCKET_NAME to an existing GCS bucket.
- Create the bucket in GCP first if it does not exist, in the matching project/region.
- Restart Flowise so initGCSConfig re-reads the environment.
Example fix
# before GOOGLE_CLOUD_STORAGE_PROJ_ID=my-project # after GOOGLE_CLOUD_STORAGE_PROJ_ID=my-project GOOGLE_CLOUD_STORAGE_BUCKET_NAME=flowise-storage
Defensive patterns
Strategy: validation
Validate before calling
function requireGcsBucketName(): string {
const name = process.env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME
if (!name) throw new Error('GOOGLE_CLOUD_STORAGE_BUCKET_NAME env variable is required')
return name
} Type guard
function hasGcsBucketName(env: NodeJS.ProcessEnv): env is { GOOGLE_CLOUD_STORAGE_BUCKET_NAME: string } & NodeJS.ProcessEnv {
return typeof env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME === 'string' && env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME.length > 0
} Prevention
- Set GOOGLE_CLOUD_STORAGE_BUCKET_NAME to an existing bucket.
- Create the bucket in GCP before enabling the backend.
- Validate required GCS env vars at startup.
When it happens
Trigger: Selecting Google Cloud Storage as the backend without setting GOOGLE_CLOUD_STORAGE_BUCKET_NAME. The guard is `!bucketName` at GCSStorageProvider.ts:36.
Common situations: Missing env entry in .env; deploying with a templated env file that left the bucket name blank; renaming the bucket in GCP without updating the env var.
Related errors
- AZURE_BLOB_STORAGE_CONTAINER_NAME env variable is required
- Azure Blob Storage configuration is missing. Provide AZURE_B
- S3 storage configuration is missing
- Environment variable '${key}' is not allowed. Permitted: ${[
- File ${fileName} not found
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/0c2ecb416ed31a93.
Report an issue: GitHub.