我尝试使用构建器在Cloud Container Builder上运行以下代码npm
:
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.
谢谢!