gpt4 book ai didi

angular - 从 @azure/msal-angular@2.1.1 安装 msal-Angular 不工作对等 rxjs @"^6.0.0"

转载 作者:行者123 更新时间:2023-12-02 23:05:41 27 4
gpt4 key购买 nike

我想安装 @azure/msal-angular 以使用 Angular 作为前端来使用 azure B2C 身份验证,但是当我尝试安装该包时,它给了我一个错误

    npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="49272e6431643b262a222c3d097867796779" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! Found: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="81f3f9ebf2c1b6afb4afb5" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/rxjs
npm ERR! rxjs@"^7.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs@"^6.0.0" from @azure/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="89e4fae8e5a4e8e7eefce5e8fbc9bba7b8a7b8" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@azure/msal-angular
npm ERR! @azure/msal-angular@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/kareem/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/kareem/.npm/_logs/2022-02-20T10_30_25_156Z-debug-0.log

你能帮我吗,我尝试了不同的方法来解决这个问题,但不幸的是没有任何反应

我尝试过的是:

npm install -g npm-install-peers

删除node_modules目录并通过npm install或npm cache clean和npm install重新安装软件包。

最佳答案

Angular 13 具有 RxJS v7 依赖项,而 MSAL 库目前(2022-02-20)仅支持 RxJS 最高版本 6.5.5。

参见:https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/4154

有一些解决方法涉及将 RxJS 降级到 v6(因为 Angular 13 也支持 RxJS v6)。您可以在我链接的这个 github 线程中找到它们。

关于angular - 从 @azure/msal-angular@2.1.1 安装 msal-Angular 不工作对等 rxjs @"^6.0.0",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71193564/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com