I am using the @azure/storage-blob version 12 SDK in my Javascript project and using the following syntax to get a list of blobs from a container. The following code results in the error Cannot read property 'blobItems' of undefined
:
var i = 1;
for await (const blob of containerClient.listBlobsFlat()) {
console.log(`Blob ${i++}: ${blob.name}`);
}
containerClient
is defined and is being used successfully with other operations like uploading blobs etc.
Incidentally, I have successfully listed my blobs from the same container and using the same SAS token in a node.JS project using the same @azure/storage-blob package.