I tried running the following code on Cloud Container Builder using the npm
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();
});
});
When I did this, I got a 404 page not found
error. How do I fix this?
In case it helps, I also tried using the Data Loss Prevention API and it gave me an error saying Getting metadata from plugin failed with error: Could not refresh access token.
Thanks!