Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiError: The combination of locationConstraint and storageClass you provided is not supported for your project #7

Open
mrdulin opened this issue Nov 13, 2018 · 0 comments

Comments

@mrdulin
Copy link
Owner

mrdulin commented Nov 13, 2018

创建cloud storagebucket时报错:

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控制台查看:

image

nodejs的客户端代码的location设置的是上图中红线区域中的值。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant