gpt4 book ai didi

angular - 在 Angular 9 应用程序的 'AuthServiceConfig' 中找不到导出 'angularx-social-login'

转载 作者:行者123 更新时间:2023-12-04 00:55:31 26 4
gpt4 key购买 nike

我试图做这个文档:https://levelup.gitconnected.com/sign-in-with-facebook-oauth-in-angular-8-3a1625eceab2
这是我的 app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { MaterialModule } from './material-module';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { LoginComponent } from './components/login/login.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FlexLayoutModule } from '@angular/flex-layout';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { SignUpComponent } from './components/sign-up/sign-up.component';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { PopUpComponent } from './components/pop-up/pop-up.component';
import { SocialLoginModule, AuthServiceConfig, FacebookLoginProvider } from 'angularx-social-login';

const config = new AuthServiceConfig ([
{
id: FacebookLoginProvider.PROVIDER_ID,
provider: new FacebookLoginProvider('646908969284899')
}
]);
export function provideConfig() {
return config;
}

@NgModule({
declarations: [
AppComponent,
LoginComponent,
SignUpComponent,
PopUpComponent
],
imports: [
BrowserAnimationsModule,
MaterialModule,
BrowserModule,
AppRoutingModule,
FormsModule,
ReactiveFormsModule,
FlexLayoutModule,
HttpClientModule,
HttpClientJsonpModule,
SocialLoginModule
],
providers: [
{
provide: AuthServiceConfig,
useFactory: provideConfig
}
],
bootstrap: [AppComponent]
})
export class AppModule { }
我运行了这个命令: npm install --save angularx-social-login我收到此错误:

Module'"../../node_modules/angularx-social-login/angularx-social-login"' hasno exported member 'AuthServiceConfig'.ts(2305)


有谁知道解决方案是什么?

最佳答案

你的 angular 和 angularx-social-login 版本是什么?
我认为这是旧版本的指南。
你可以关注这个:Angular 9 / 10 Social Login

关于angular - 在 Angular 9 应用程序的 'AuthServiceConfig' 中找不到导出 'angularx-social-login',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62794786/

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