获取angular 8应用程序中AppComponent_主机ngfactory js中的[object object]时出错
我正在尝试从Microsoft Identity platform(使用MSAL库对Azure AD用户进行身份验证)运行此官方示例,并收到以下错误。我无法准确地找出导致此错误的软件包或版本,以及如何着手修复它。有什么想法吗 VM61 AppComponent_Host.ngfactory.js:6错误:[对象] 在viewwrappedebugerror(VM21 vendor.js:84484) 在callWithDebugContext(VM21 vendor.js:95180) 在Object.debugCreateRootView[作为createRootView](VM21 vendor.js:94680) 在ComponentFactory.push../node\u modules/@angular/core/fesm5/core.js.ComponentFactory.create(VM21 vendor.js:85367) 在ComponentFactoryBoundToModule.push../node_modules/@angular/core/fesm5/core.js.ComponentFactoryBoundToModule.create(VM21 vendor.js:83089) 在ApplicationRef.push../node_modules/@angular/core/fesm5/core.js.ApplicationRef.bootstrap(VM21 vendor.js:91935) 在VM21 vendor.js:91657 在Array.forEach()处 在PlatformRef.push../node_modules/@angular/core/fesm5/core.js.PlatformRef._moduleDoBootstrap(VM21 vendor.js:91657) 在VM21 vendor.js:91625获取angular 8应用程序中AppComponent_主机ngfactory js中的[object object]时出错,angular,msal,Angular,Msal,我正在尝试从Microsoft Identity platform(使用MSAL库对Azure AD用户进行身份验证)运行此官方示例,并收到以下错误。我无法准确地找出导致此错误的软件包或版本,以及如何着手修复它。有什么想法吗 VM61 AppComponent_Host.ngfactory.js:6错误:[对象] 在viewwrappedebugerror(VM21 vendor.js:84484) 在callWithDebugContext(VM21 vendor.js:95180) 在Obj
Msal配置出现问题。我只设置了租户IdGuid的权限值,如下所示
MsalModule.forRoot({
auth: {
clientId: 'xxxxxxxxxx-bxxxxx-4xxxxxx-9xxxxx-xxxxcf',
authority: 'xxxxxxxxxx-dddxxxxx-ffffxxxxx-8xxxxx-xxxxcs',
redirectUri: 'http://localhost:4202/',
},
cache: {
cacheLocation: 'localStorage',
storeAuthStateInCookie: isIE, // set to true for IE 11
},
},
{
popUp: !isIE,
consentScopes: [
'user.read',
'openid',
'profile',
],
unprotectedResources: [],
protectedResourceMap: [
['https://graph.microsoft.com/v1.0/me', ['user.read']]
],
extraQueryParameters: {}
})
权限值应该是authority(或Cloud\u Instance\u Id)/tenantId
我希望angular或Msal库中会显示更好的错误/异常,以便为我们提供一个指针,指出Msal配置存在问题
希望它能帮助那些面临同样问题的人尝试删除node_模块,然后重新进行npm安装。@AakashGarg这正是我所做的,它对运行应用程序所使用的命令没有任何影响。您是否遵循了github url中提到的安装步骤?我们可以进行配置吗?因为没有它我们就无法建立它。