Error "Can't resolve 'crypto' in node_modules\@azure\storage-blob\dist-esm\storage-blob\src\credentials
See original GitHub issue- Package Name: @azure/storage-blob
- Package Version: 12.4.0
- Operating system: Windows 10
- typescript
- version: 4.0.5
Describe the bug After upgrading from “@azure/storage-blob”: “^12.2.1”, to “@azure/storage-blob”: “^12.4.0”, the Angular 11 compiler shows following error after ‘ng serve’ was executed: ` Error: ./node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js Module not found: Error: Can’t resolve ‘crypto’ in ‘C:\Projects\Angular-Portal\node_modules@azure\storage-blob\dist-esm\storage-blob\src\credentials’
Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat ‘C:\DumpStack.log.tmp’ Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat ‘C:\hiberfil.sys’ Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat ‘C:\pagefile.sys’ Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat ‘C:\swapfile.sys’ `
To Reproduce Steps to reproduce the behavior:
- use new package with Angular 11 and Typescript 4.0.5
Expected behavior No error and working sdk.
Additional context With previous version the same code is working. “@azure/identity”: “^1.1.0” was upgraded to “@azure/identity”: “^1.2.2” without any issues. Is also working with “@azure/storage-blob”: “^12.2.1”.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top GitHub Comments
@ljian3377 check this https://github.com/Azure/azure-sdk-for-js/pull/13293
Error: Unable to resolve module crypto from \azure\AzureDemo\node_modules@azure\storage-blob\dist\index.js: crypto could not be found within the project or in these directories: node_modules.
when trying to install it gives errors to install others package also and chain continues to install packages only.
Using in React-native “@azure/storage-blob”: “^12.5.0”,