abp icon indicating copy to clipboard operation
abp copied to clipboard

NullInjectorError creating new tenant in abp

Open rasmani795 opened this issue 5 years ago • 4 comments

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. null injection token

rasmani795 avatar Feb 20 '21 13:02 rasmani795

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?

mehmet-erim avatar Feb 22 '21 10:02 mehmet-erim

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 { }

rasmani795 avatar Feb 24 '21 06:02 rasmani795

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:

image

All ABP packages should be v4.2.1. Please check it out.

mehmet-erim avatar Feb 25 '21 10:02 mehmet-erim

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.

stale[bot] avatar Apr 27 '21 22:04 stale[bot]