This repository was archived by the owner on Apr 23, 2025. It is now read-only.
This repository was archived by the owner on Apr 23, 2025. It is now read-only.
ApiError: The combination of locationConstraint and storageClass you provided is not supported for your project #7
Open
Description
创建cloud storage
的bucket
时报错:
ApiError: The combination of locationConstraint and storageClass you provided is not supported for your project
原因是location
参数设置错误,错误的代码:
async function main() {
const buckets = await getBuckets();
logger.info(JSON.stringify(buckets));
const bucketName = 'nodejs-gcp';
await createBucket(bucketName, {
regional: true,
location: 'ASIA'
});
}
修改后的代码:
async function main() {
const buckets = await getBuckets();
logger.info(JSON.stringify(buckets));
const bucketName = 'nodejs-gcp';
await createBucket(bucketName, {
regional: true,
location: 'asia-east1'
});
}
去GCP
控制台查看:
nodejs
的客户端代码的location
设置的是上图中红线区域中的值。
Metadata
Metadata
Assignees
Labels
No labels