I am working with azure active directory and I get this weird module not found error followed by a chokidar error :
./node_modules/react-aad-msal/dist/commonjs/MsalAuthProvider.js
Module not found: Can't resolve 'msal' in 'C:\Users\paull\Monitoring_SOT\monitoring_sot\node_modules\react-aad-msal\dist\commonjs'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'
The purpose of this part is to create a authProvider. I am using create-react-app and this is my authProvider. Using the latest versions of everything.
//Configuration
const config = {
auth: {
authority: 'https://login.microsoftonline.com/common',
clientId: '<clientid>',
},
cache: {
cacheLocation: "localStorage",
storeAuthStateInCookie: true
}
};
//Paramètres
const authenticationParameters = {
scopes: [
'profile.read'
]
};
//Options
const options = {
loginType: LoginType.Redirect
}
export const authProvider = new MsalAuthProvider(config, authenticationParameters, options)
In fact when you install the npm react-aad-msal it does not add the msal dependency to your project.
You should do npm i msal
letting this here so people could know