microsoft-authentication-library-for-js: Cannot find module '@azure/msal-common' and '@azure/msal-angular' or its corresponding type declarations.
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
3.0.0-alpha.0
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
3.0.0-alpha.0
Public or Confidential Client?
Public
Description
import { MsalService } from '@azure/msal-angular';
^^^^^^^^^^^^^^^^^^
import { AuthenticationResult, InteractionRequiredAuthError } from '@azure/msal-common';
^^^^^^^^^^^^^^^^^^^^
we can not import the MsalService
from @azure/msal-angular
.
we noticed this error few hours ago. we are using angular 16.
we also tried following versions. and its same for all those versions.
"@azure/msal-angular": "^3.0.0",
"@azure/msal-browser": "^3.0.0",
"@azure/msal-angular": "^3.0.0-alpha.2",
"@azure/msal-browser": "^3.0.0-alpha.2"
"@azure/msal-angular": "^3.0.0-beta.1",
"@azure/msal-browser": "^3.0.0-beta.1"
Error Message
Cannot find module ‘@azure/msal-angular’ or its corresponding type declarations.
Msal Logs
MSAL Configuration
{
auth: {
clientId: clientId,
authority: "B2C_1A_SIGNUP_SIGNIN",
redirectUri: '/',
navigateToLoginRequestUrl: false
},
cache: {
cacheLocation: "LocalStoarage",
storeAuthStateInCookie: false
}
}
Relevant Code Snippets
import { MsalService } from '@azure/msal-angular';
import { AuthenticationResult, InteractionRequiredAuthError } from '@azure/msal-common';
Reproduction Steps
- npm i @azure/msal-browser
- npm i @azure/msal-angular
- import { MsalService } from ‘@azure/msal-angular’; to the service.
- import { AuthenticationResult, InteractionRequiredAuthError } from ‘@azure/msal-common’;
Expected Behavior
Should be able to use MsalService
from '@azure/msal-angular'
Identity Provider
Azure B2C Custom Policy
Browsers Affected (Select all that apply)
None (Server)
Regression
No response
Source
External (Customer)
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 17
- Comments: 26
@HansakaSS Thanks for raising this issue. There has been an error in our release process and we are currently working on a fix. Thank you all for your patience.
It’s broken, do not use version ^3.0.0 right now, this fix the issue for now: “@azure/msal-angular”: “3.0.0-beta.1”, “@azure/msal-browser”: “3.0.0-beta.1”,
The current workaround for this issue is using the beta version for msal browser: “@azure/msal-browser”: “3.0.0-beta.1”, “@azure/msal-common”: “^14.5.0”, “@azure/msal-react”: “2.0.8”,
Wow, they really shit the bed… see also https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/5410
Can confirm that the bug in react version is still there
another issue is that
source-map-loader
shows the warning message, we need to ignore the warning message by the following workaround. fix: ignore webpack warnings by source-map-loader #11752@tnorling Yes it is indeed still a problem. The contents of
node_modules@azure/msal-angular
only consist of LICENSE, readme.md and package.json.