@azure/cosmos@3.17.0 - cannot find module @azure/identity
See original GitHub issueEnvironment
- @azure/cosmos@3.17.0 in npm
- macOS 12.5.1
- nodejs 14.19.2
Describe the bug
@azure/cosmos@3.17.0 (the latest), when require
’d, has a Cannot find module error
for @azure/identity
.
Error: Cannot find module '@azure/identity'
Require stack:
- ~/Desktop/tmp/azure-cosmos-test/node_modules/@azure/cosmos/dist/index.js
@azure/identity
is only a devDependency: https://github.com/Azure/azure-sdk-for-js/blob/57387dcc64a57d7e1d524291752c6c576af28ef7/sdk/cosmosdb/cosmos/package.json#L110
To Reproduce
Steps to reproduce the behavior:
- mkdir test
- cd test
- npm init -y
- npm i @azure/cosmos@3.17.0
- echo ‘require(“@azure/cosmos”)’ > index.js
- node index.js
Expected behavior
No errors when importing/requiring the @azure/cosmos
module.
Actual behavior
Cannot find module @azure/identity
error encountered when importing/requiring the @azure/cosmos module.
Workaround
Pin to @azure/cosmos@3.16.4 <-- note no caret! ^
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Azure Functions: Cannot find module '@azure/cosmos'
I run rm -r ./node_modules via SSH in Azure portal and rerun git push . Then, @azure/cosmos was installed.
Read more >azure static site API sporadically fail with "azure/cosmos" not ...
I get following exception when running API ... Worker was unable to load function GetTaskList: 'Error: Cannot find module '@azure/cosmos'.
Read more >Artifactory npm task (ArtifactoryNpm@2) giving error
It was working fine till yesterday but today we are getting issue of module azure-pipelines-task-lib/task' not found . we have also tried npm@1...
Read more >Module not found with Node on App Service Linux -
At a high level, seeing error: cannot find module [someModuleName] means this ... <anonymous> (/home/site/wwwroot/index.js:1:17) at module.
Read more >SonarCloud error in Azure build pipeline for blazer project Error
... Module.require (internal/modules/cjs/loader.js:690:17) ERROR: throw err; ERROR: ^ ERROR: ERROR: Error: Cannot find module 'typescript' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jay-most Looks like a blocking issue, can you please check asap?
I can confirm that with the repro steps above with v3.17.1, the issue is resolved.