microsoft-authentication-library-for-js
microsoft-authentication-library-for-js copied to clipboard
Unable to install MSAL React in React 19
Core Library
MSAL.js (@azure/msal-browser)
Wrapper Library
MSAL React (@azure/msal-react)
Public or Confidential Client?
Public
Description
The msal react installation in react 19 is failing with the attached error
Unable to install MSAL react in react 19. Is react 19 supported for the current version of MSAL ? When can we expect MSAL to support React 19 ?
Anyone please help!!!
Same issue. This library is preventing us from upgrading to React 19.
FYI, in the meantime you can just add the following override to your package.json as a workaround
(before you run npm i @azure/msal-react:
"overrides": {
"react": "$react"
},
If you want to scope the override to just the msal package do this instead:
"overrides": {
"@azure/msal-react": {
"react": "$react"
}
},
Hope upgrading to React19 without any unexcepted operation
"overrides": { "@azure/msal-react": { "react": "$react" } }, @SunnyJohal Thanks for the help. This works fine for now.
Could you please merge the PR ...
PR https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/7467 seems related to this issue, but it is currently not yet merged.
Ah, this issue seems to be a duplicate of https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/7455.
Blocked due to this package dependency when upgrading to React 19.
Seeing a similar issue I resolved using configuration settings, would a solution be to use:
.npmrc
legacy-peer-deps=true
or
npm install --legacy-peer-deps
This should at least allow the install to complete.
See this pull request: https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/7710