-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure Identity node_modules issue: turing-apis/node_modules/@azure/identity/dist/index.js:1 Error: Cannot find module '@azure/msal-node' #29062
Comments
Hey @TedduNithin - thanks for reaching out about this. By any chance are you using the |
Hi @TedduNithin. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @maorleger, Yeah I'm using esm in my project. Here is my package.json contents
And here is the output of
|
Great! Thanks for the quick reply. Unfortunately this is an issue with @azure/msal-node , a dependency of @azure/identity and esm. I was able to isolate it to @azure/msal-node a few weeks ago (minimal repro here) Unfortunately the A few things you could do:
Hope this helps, sorry I don't have a better answer for you - it's an issue with esm |
Thank you for your prompt response, @maorleger. I will explore the ESM fork you suggested and update you accordingly. Additionally, I will close this issue here and open a new one in the repository you mentioned to seek further assistance. Once again, thank you very much. |
No problem! Hope this information helps 👍 |
Hi @TedduNithin. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation. |
Hi @maorleger, Using the esm-wallaby package in place of esm package fixed the issue. Thank you very much for your help; it's highly valued. |
https://www.npmjs.com/package/@azure/identity
4.0.1
mac os and ubuntu
v20.11.1 and v18.19.1
npm version 10.5.0
Describe the bug
In our Node.js application, we are utilizing the Azure Identity and Azure KeyVault-Keys packages. However, upon running the server, I encounter the following issue within the Azure Identity package:
I've located the file responsible for the error within the node_modules directory. This file contains the following code at the beginning:
It seems that the failure occurs in the initial "require" statement. When I manually switched the order of the "require" statements, placing the second one first, I encountered a different error related to the logger package.
I attempted to resolve the issue by installing the "@azure/msal-node" package using the command
npm i @azure/msal-node
. However, despite installing the missing module as indicated by the error message, the issue persists.I have attempted to address this problem using Node.js versions 16, 18, and 20. Additionally, I have experimented with various stable versions of the "@azure/identity" package, yet the issue persists.
This problem has been impeding the progress of a production application for over a week now. I would greatly appreciate any assistance in resolving it. Thank you for your help.
Screenshots
The text was updated successfully, but these errors were encountered: