Copied this code from storage docs, tried with node interactive prompt, and expected it to work.
var gcloud = require('gcloud');
var storage = gcloud.storage;
var bucket = new storage.Bucket({ bucketName: 'example-bucket' });
var signedUrl = bucket.getSignedUrl({
action: 'read',
expires: Math.round(Date.now() / 1000) + (60 * 60 * 24 * 14), // 2 weeks.
resource: 'test.jpg'
});
TypeError: Cannot read property 'private_key' of null
at Bucket.getSignedUrl (/home/<my-home-dir>/node_modules/gcloud/lib/storage/index.js:288:50)
at repl:1:24
at REPLServer.self.eval (repl.js:110:21)
at repl.js:249:20
at REPLServer.self.eval (repl.js:122:7)
at Interface.<anonymous> (repl.js:239:12)
at Interface.emit (events.js:95:17)
at Interface._onLine (readline.js:202:10)
at Interface._line (readline.js:531:8)
at Interface._ttyWrite (readline.js:760:14)
Copied this code from storage docs, tried with node interactive prompt, and expected it to work.