NullInjectorError creating new tenant in abp
GitHub Issues
- ABP Framework version 4.2.1
- Angular
I'm using Abp 4.0.0. Now I updated into Abp 4.2.1. While clicking on create tenant its shown NullInjectorError.
Hi @rasmani795
The problem is not related to the tenant creation. Can you share the app.module.ts content so that I can find the source of the problem?
Yes, I can share the module.
import { AccountConfigModule } from '@abp/ng.account/config'; import { CoreModule} from '@abp/ng.core'; import { IdentityConfigModule } from '@abp/ng.identity/config'; import { SettingManagementConfigModule } from '@abp/ng.setting-management/config'; import { TenantManagementConfigModule } from '@abp/ng.tenant-management/config'; import { ThemeBasicModule } from '@abp/ng.theme.basic'; import { ThemeSharedModule } from '@abp/ng.theme.shared'; import { NgModule} from '@angular/core'; import { BrowserModule, Title } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { NgxsModule } from '@ngxs/store'; import { environment } from '../environments/environment'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { SharedModule } from './shared/shared.module';
@NgModule({ imports: [ CoreModule.forRoot({ environment, registerLocaleFn: registerLocale( { cultureNameLocaleFileMap: { 'pt-BR': 'pt' } }) }), ThemeSharedModule.forRoot(), IdentityConfigModule.forRoot(), TenantManagementConfigModule.forRoot(), SettingManagementConfigModule.forRoot(), ThemeBasicModule.forRoot(), NgxsModule.forRoot(), BrowserModule, BrowserAnimationsModule, AppRoutingModule, SharedModule ], declarations: [AppComponent], bootstrap: [AppComponent], providers: [ Title ], }) export class AppModule { }
Everything looks good in the app.module. I think all @abp/* packages are not up to date in your project.
Can you run the command below to see abp package versions:
yarn list --pattern abp
Here is a reference screenshot:

All ABP packages should be v4.2.1. Please check it out.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.