我正在使用azure active directory,我得到了这个奇怪的模块找不到错误,然后是chokidar错误:
./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'本部分的目的是创建authProvider。我正在使用create-react-app,这是我的authProvider。使用最新版本的一切。
//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)发布于 2020-06-26 20:17:25
事实上,当您安装npm react-aad-msal时,它不会向您的项目添加msal依赖项。你应该做npm i msal,让它在这里,这样人们就可以知道
https://stackoverflow.com/questions/62593327
复制相似问题