簡體   English   中英

使用 react-aad-msal 時來自 chokidar 的錯誤

[英]Error from chokidar while using react-aad-msal

我正在使用 azure 活動目錄,我得到這個奇怪的模塊未找到錯誤,然后是一個 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)

實際上,當您安裝 npm react-aad-msal 時,它不會將 msal 依賴項添加到您的項目中。 你應該做npm i msal這個放在這里讓人們知道

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM