I'm trying to create AzureServerStorage without using inversify and running into following error:
index.ts:19:105 - error TS2345: Argument of type 'import("/home/gytis/snippets/create-object-storage-impl-without-inversify-esm-problem/node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/esm/BlobServiceClient", { with: { "resolution-mode": "import" } }).BlobServiceClient' is not assignable to parameter of type 'import("/home/gytis/snippets/create-object-storage-impl-without-inversify-esm-problem/node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient").BlobServiceClient'.
Types have separate declarations of a private property 'serviceContext'.
19 const objectStorage: ServerStorage = new AzureServerStorage(storageConfig, new BlobServiceClientWrapper(blobServiceClient));
We have moduleResolution set to NodeNext as we're working on modern Node.js application.
This could be fixed if object-storage would provide ESM exports.
Gist to reproduce issue
I'm trying to create
AzureServerStoragewithout usinginversifyand running into following error:We have
moduleResolutionset toNodeNextas we're working on modern Node.js application.This could be fixed if object-storage would provide ESM exports.
Gist to reproduce issue