【发布时间】:2018-01-31 23:51:58
【问题描述】:
我尝试使用npm 构建器在Cloud Container Builder 上运行以下代码:
const Storage = require('@google-cloud/storage');
const storage = new Storage();
const bucketName = 'some-bucket-name';
test(`can access GCP`, async (t) => {
await storage
.createBucket(bucketName)
.then(() => {
console.log(`Bucket ${bucketName} created.`);
t.pass();
})
.catch(err => {
console.log(err);
t.fail();
});
});
当我这样做时,我收到了 404 page not found 错误。我该如何解决这个问题?
如果有帮助,我也尝试使用Data Loss Prevention API,但它给了我一个错误,说Getting metadata from plugin failed with error: Could not refresh access token.
谢谢!
【问题讨论】:
标签: node.js google-cloud-platform google-cloud-storage google-container-builder