Closed jnunderwood closed 1 year ago
This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @hectormmg please follow up.
This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @hectormmg please follow up.
I do have the same error with @azure/msal-browser v3.1.0 in Angular.
./src/app/app.module.ts:11:0-82 - Error: Module not found: Error: Package path ./dist/utils/BrowserConstants is not exported from package node_modules\@azure\msal-browser (see exports field in node_modules\@azure\msal-browser\package.json)
I'm encountering the same error in my Vue 3 project
src/plugins/msalPlugin.ts:82:9 - error TS2322: Type 'InteractionStatus' is not assignable to type '"startup"'. Type '"none"' is not assignable to type '"startup"'. 82 state.inProgress = status;
I'm also encountering issues when building with vite:
"ServerResponseType" is not exported by "node_modules/@azure/msal-common/dist/index.js", imported by "node_modules/@azure/msal-browser/dist/config/Configuration.mjs".
As a temporary workaround you can explicitly set the type of inProgress like this in your plugins:
const inProgress = InteractionStatus.Startup as InteractionStatus;
instead of this:
const inProgress = InteractionStatus.Startup
As a temporary workaround you can explicitly set the type of inProgress like this in your plugins:
This does indeed fix that issue. Thank you!
Unfortunately, even with that fix, I can no longer authenticate using v3.1.0
. The browser console shows a message, but no errors:
@azure/msal-common@14.0.3 : Info - CacheManager:getIdToken - No token found"
When running v2.38.2
, I see additional messages in the browser console, such as:
@azure/msal-browser@2.38.2 : Info - Emitting event: msal:handleRedirectStart"
@azure/msal-browser@2.38.2 : Info - Emitting event: msal:acquireTokenStart"
At this point, without an error message or some indication of a code problem, I am not sure how to proceed.
To be honest I had the failing line of code completely commented out and my solution still worked, I could still log in and out. I feel like your problem will be with the migration from 2.x to 3.x. I haven't used 2.x before, I just implemented MSAL for my Vue application recently, straight with the latest available version. I can only recommend to go through the migration guide again, maybe you'll find something there:
This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @hectormmg please follow up.
I had already reviewed the migration guide. However, I reviewed it again and it looks like I missed something the first time. I also upgraded to v3.2.0
. Everything seems to be working now. Thanks for everyone's comments and help!
Closing issue since things are working now.
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
3.1.0
Wrapper Library
Not Applicable
Wrapper Library Version
None
Public or Confidential Client?
Public
Description
I have written a Vue.js app using
msal-browser
. Everything works well usingv2.38.2
. However, when I upgrade tov3.1.0
, the build fails with an error fromMsalPlugin.ts
. Other than minor formatting changes, this file is exactly the same as the one from thevue3-sample-app
. I am usingvue-3.3.4
withvite-4.4.9
andnode-18.17.1
. Note that I am also usingtypescript-5.2.2
.Error Message
Msal Logs
N/A
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Expected Behavior
Build should produce no errors.
Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
None (Server)
Regression
@azure/msal-browser 2.38.2
Source
External (Customer)