I ahve similar problem with this one https://abp.io/support/questions/8997/NullInjectorError-No-provider-for-InjectionToken-undefined-in-Standalone-Component But those suggested solutions didn't work for me.
Here is version that I'm using at frontend: node version 22.20.0 yarn 1.22.22 abp 9.3.6 angular 20.3.7
I updated from 8.3.4 to 9.3.6 and followed your migration guides.
We will stay with module based structure because our application is quite big. Maybe later but not now.
So problem occures when I'm trying to navigate to 'saas/tenants' page. Page stays empty and I got console error that says: No provider found for InjectionToken undefined. Source: Standalone[_TenantsComponent].
I have tried to clean all places: node_modules, .angular and yarn.lock.
Am I missing some module or provider in my app module.
Here is my app.module.ts(I cleaned away our own modules):
import { PAGE_RENDER_STRATEGY } from '@abp/ng.components/page';
import {
  CoreModule,
  LazyLocalizationPipe,
  LocalizationPipe,
  LocalizationService,
  NAVIGATE_TO_MANAGE_PROFILE,
  provideAbpCore,
  withOptions,
} from '@abp/ng.core';
import { provideSettingManagementConfig, SettingManagementConfigModule } from '@abp/ng.setting-management/config';
import {
  CUSTOM_ERROR_HANDLERS,
  DEFAULT_VALIDATION_BLUEPRINTS,
  provideAbpThemeShared,
  ThemeSharedModule,
  withHttpErrorConfig,
} from '@abp/ng.theme.shared';
import { registerLocaleData } from '@angular/common';
import { provideHttpClient, withInterceptorsFromDi, withXsrfConfiguration } from '@angular/common/http';
import localeFi from '@angular/common/locales/fi';
import { ErrorHandler, LOCALE_ID, NgModule, importProvidersFrom, isDevMode } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { VALIDATION_BLUEPRINTS } from '@ngx-validate/core';
// https://www.telerik.com/kendo-angular-ui/components/globalization/internationalization/locale-changes/
import { IntlService } from '@progress/kendo-angular-intl';
import '@progress/kendo-angular-intl/locales/en/all';
import '@progress/kendo-angular-intl/locales/fi/all';
import { MessageService } from '@progress/kendo-angular-l10n';
import { CommercialUiConfigModule, provideCommercialUiConfig } from '@volo/abp.commercial.ng.ui/config';
import { AccountAdminConfigModule, provideAccountAdminConfig } from '@volo/abp.ng.account/admin/config';
import { AccountPublicConfigModule, provideAccountPublicConfig } from '@volo/abp.ng.account/public/config';
import { AuditLoggingConfigModule, provideAuditLoggingConfig } from '@volo/abp.ng.audit-logging/config';
import { provideOpeniddictproConfig } from '@volo/abp.ng.openiddictpro/config';
import { IdentityConfigModule, provideIdentityConfig } from '@volo/abp.ng.identity/config';
import { registerLocale } from '@volo/abp.ng.language-management/locale';
import { provideSaasConfig, SaasConfigModule } from '@volo/abp.ng.saas/config';
import { HttpErrorComponent, ThemeLeptonModule } from '@volo/abp.ng.theme.lepton';
import { MenuSearchModule } from '@volo/abp.ng.theme.lepton/extensions';
import { AngularSvgIconModule } from 'angular-svg-icon';
import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { KendoFormsModule } from './common/kendo-forms/kendo-forms.module';
import { HelpComponent } from './components/help/help.component';
import { ControlsConfigModule } from './controls/controls-config.module';
import { ComponentsConfigModule } from './demo/components/components-config.module';
import { TablesConfigModule } from './demo/tables/tables-config.module';
import { ItemPlanningConfigModule } from './item-planning/item-planning-config.module';
import { APP_ROUTE_PROVIDER } from './route.provider';
import { ScmPageRenderStrategy } from './scm-page-render-strategy';
import { SettingsConfigModule } from './settings/settings-config.module';
import { ApplicationInsightsErrorHandler } from './shared/services/application-insights-service/application-insights-error-handler';
import { KendoMessagesService } from './shared/services/kendo-messages-service/kendo-messages.service';
import { TawkService } from './tawk-service';
import { provideAbpOAuth } from '@abp/ng.oauth';
import { BeamerService } from './beamer.service';
import { ServiceWorkerModule } from '@angular/service-worker';
import { SCMCustomErrorHandlerService } from './shared/services/custom-error-handler-service/scm-custom-error-handler.service';
import { ForecastingConfigModule } from 'projects/SCM.Forecasting/config/src/forecasting-config.module';
import { USER_MENU_ADDED_ITEMS } from './account/user-menu-extended.routes';
import { AccountConfigModule } from './account/account-config.module';
import { Router } from '@angular/router';
import { KendoIntlService } from './shared/services/kendo-intl.service';
import { XmasModule } from './shared/components/special-events/xmas/xmas.module';
import { provideLanguageManagementConfig } from '@volo/abp.ng.language-management/config';
import { provideTextTemplateManagementConfig } from '@volo/abp.ng.text-template-management/config';
import { provideAnimations } from '@angular/platform-browser/animations';
// Finnish locale needs to be registered always since we have scm currency pipe that might use different locale from localization service.
// If it is not registered fi-FI locale is not found if the language is not fi
registerLocaleData(localeFi);
const dev = environment.production ? [] : [ComponentsConfigModule.forRoot(), TablesConfigModule.forRoot()];
@NgModule({
  declarations: [AppComponent, HelpComponent],
  bootstrap: [AppComponent],
  imports: [
    AngularSvgIconModule.forRoot(),
    BrowserModule,
    AppRoutingModule,
    CoreModule,
    ThemeSharedModule,
    AccountAdminConfigModule,
    IdentityConfigModule,
    SaasConfigModule,
    AuditLoggingConfigModule,
    SettingManagementConfigModule,
    MenuSearchModule.forRoot({ limit: 3 }),
    ThemeLeptonModule.forRoot({
      // DISABLED Search and Help main navigation items, left here for easy re-enabling:
      // contentBeforeRoutes: [MenuSearchComponent],
      // contentAfterRoutes: [HelpComponent]
      // If this customStyle is true, the style selection box is not included in the theme
      // settings form and ThemeLeptonModule does not load its own styles. In this case,
      // a custom style file must be added to the styles array in angular.json or must be imported by style.scss.
      // https://docs.abp.io/en/commercial/7.1/themes%2Flepton%2Fcustomizing-lepton-theme?UI=NG
      customStyle: true,
    }),
    CommercialUiConfigModule,
    ItemPlanningConfigModule.forRoot(),
    ControlsConfigModule.forRoot(),
    SettingsConfigModule.forRoot(),
    AccountConfigModule.forRoot(),
    KendoFormsModule,
    ...dev,
    ServiceWorkerModule.register('ngsw-worker.js', {
      enabled: !isDevMode(),
      // Register the ServiceWorker as soon as the application is stable
      // or after 30 seconds (whichever comes first).
      registrationStrategy: 'registerWhenStable:30000',
    }),
    XmasModule,
  ],
  providers: [
    APP_ROUTE_PROVIDER,
    USER_MENU_ADDED_ITEMS,
    KendoIntlService,
    provideAbpCore(
      withOptions({
        environment,
        registerLocaleFn: registerLocale(),
      }),
    ),
    provideHttpClient(
      withInterceptorsFromDi(),
      withXsrfConfiguration({
        cookieName: 'XSRF-TOKEN',
        headerName: 'RequestVerificationToken',
      }),
    ),
    provideAbpThemeShared(
      withHttpErrorConfig({
        errorScreen: {
          component: HttpErrorComponent,
          forWhichErrors: [401, 403, 404, 500],
          hideCloseIcon: true,
        },
      }),
    ),
    importProvidersFrom(
      AccountPublicConfigModule.forRoot(),
      AccountAdminConfigModule.forRoot(),
      IdentityConfigModule.forRoot(),
      SaasConfigModule.forRoot(),
    ),
    provideAnimations(),
    provideAbpOAuth(),
    provideIdentityConfig(),
    provideSettingManagementConfig(),
    provideAccountAdminConfig(),
    provideAccountPublicConfig(),
    provideCommercialUiConfig(),
    provideSaasConfig(),
    provideAuditLoggingConfig(),
    provideOpeniddictproConfig(),
    provideTextTemplateManagementConfig(),
    provideLanguageManagementConfig(),
    {
      provide: LocalizationPipe,
      useExisting: LazyLocalizationPipe,
    },
    {
      provide: IntlService,
      useExisting: KendoIntlService,
    },
    {
      provide: LOCALE_ID,
      deps: [LocalizationService],
      useFactory: (localizationService: LocalizationService) => localizationService.currentLang,
    },
    { provide: MessageService, useExisting: KendoMessagesService },
    { provide: PAGE_RENDER_STRATEGY, useClass: ScmPageRenderStrategy },
    {
      provide: VALIDATION_BLUEPRINTS,
      useValue: {
        ...DEFAULT_VALIDATION_BLUEPRINTS,
        pattern: 'AbpValidation::InvalidPatternPleaseReviewYourInput',
        min: 'AbpValidation::ThisFieldMustBeGreaterThanOrEqualTo{0}[{{ min }}]',
        max: 'AbpValidation::ThisFieldMustBeLessThanOrEqualTo{0}[{{ max }}]',
        calculationPeriodStartDate: 'AbpValidation::StartDateCanNotBeInFuture',
        duplicatePriority: 'AbpValidation::PriorityIsAlreadyInUse',
        duplicateName: 'AbpValidation::NameIsAlreadyInUse',
        dateIsInPast: 'AbpValidation::DateCanNotBeInPast',
        maxDecimals: 'AbpValidation::ThisFieldMustContainLessThanOrEqualDecimals{0}[{{ maxDecimals }}]',
        greaterThanField: 'AbpValidation::ThisFieldMustBeGreaterThan{0}[{{ field }}]',
        greaterThanZero: 'AbpValidation::ThisFieldMustBeGreaterThan{0}[0]',
        lessThanField: 'AbpValidation::ThisFieldMustBeLessThan{0}[{{ field }}]',
        invalidValues: 'AbpValidation::InvalidValues{0}ValidValues{1}[{{ invalidField }},{{ validField }}]',
        missingRequiredValues: 'AbpValidation::MissingRequiredValues{0}[{{ field }}]',
        dateIsNotInPastOrToday: 'AbpValidation::DateCanNotBeInPastOrToday',
      },
    },
    { provide: CUSTOM_ERROR_HANDLERS, useExisting: SCMCustomErrorHandlerService, multi: true },
    { provide: ErrorHandler, useClass: ApplicationInsightsErrorHandler },
    {
      provide: NAVIGATE_TO_MANAGE_PROFILE,
      deps: [Router],
      useFactory: (router: Router) => () => router.navigate(['/account/manage']),
    },
    TawkService,
    BeamerService,
  ],
})
export class AppModule {}
3 Answer(s)
- 
    0- Solution The error “No provider found for InjectionToken undefined. Source: Standalone[_TenantsComponent]” occurs because, starting with ABP Angular v9, feature UIs (like Saas Tenants) use standalone components and provide their own feature-level providers via createRoutes/provideXxxConfig. In a module-based app that still imports config modules, it’s easy to miss one of these providers when navigating directly to a standalone feature page.
 Apply these steps: - Use createRoutes for SAAS routes (even in a module-based app) In your AppRoutingModule (or wherever you define feature routes), load the Saas routes using the package’s route factory. This ensures the Tenants standalone component receives its providers. - Example: import { RouterModule, Routes } from '@angular/router'; import { createRoutes as createSaasRoutes } from '@volo/abp.ng.saas'; - const routes: Routes = [ { path: 'saas', loadChildren: () => import('@volo/abp.ng.saas').then(m => createSaasRoutes()), }, // ...other routes ]; - @NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule], }) export class AppRoutingModule {} 
- Keep provideSaasConfig() in root providers You already have: - SaasConfigModule in imports,
- importProvidersFrom(SaasConfigModule.forRoot()),
- provideSaasConfig() in providers.
 - That’s fine. The critical part is that the route uses createSaasRoutes() so the Tenants standalone component runs with the correct Feature providers. If you currently lazy-load a module via SaasConfigModule.forRoot() alone or navigate to the component outside its created routes, the DI context misses feature tokens. 
- Do not declare or import TenantsComponent manually Don’t import or declare _TenantsComponent (or any SAAS component) directly in your own module. Always navigate through the SAAS routes returned by createSaasRoutes(). 
- Version alignment Ensure all ABP/Commercial Angular packages are on the same exact version range as the ABP CLI template you’re targeting, and Angular is aligned. For ABP 9.3.6: - @abp/* and @volo/* packages: ~9.3.x
- Angular: 20.3.x After editing package versions, delete node_modules and your lock file, then reinstall.
 
- If you previously used forLazy() Replace any old lazy-load syntax like: loadChildren: () => import('@volo/abp.ng.saas').then(m => m.SaasModule.forLazy({...})) with the new: loadChildren: () => import('@volo/abp.ng.saas').then(m => m.createRoutes({...})) 
- Last-resort guard If you still see the InjectionToken undefined from a standalone component, it almost always means that page is rendered outside its feature route tree. Double-check that: - Navigation to saas/tenants is via the router above,
- No direct component reference or custom route bypasses the createSaasRoutes() returned tree.
 
 - Sources
 - https://abp.io/support/questions/8997/NullInjectorError-No-provider-for-InjectionToken-undefined-in-Standalone-Component
- https://abp.io/community/articles/zzi2rr2z
 
 This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon. 
- 
    0That "createSaasRoutes" fixed that TenantComponent problem. Should I change all abp routes to this kind? 
- 
    0- Solution Short answer: Yes—use createRoutes for every ABP/Commercial feature package route you lazy-load (Identity, Saas, Audit Logging, Language Management, Text Template Management, Account, etc.) after upgrading to v9.x. This ensures each standalone feature page gets its feature-level providers and avoids InjectionToken undefined errors.
 What to change - Replace old forLazy() or module class lazy-loads with createRoutes for each package:
- @volo/abp.ng.identity → import('@volo/abp.ng.identity').then(m => m.createRoutes())
- @volo/abp.ng.saas → import('@volo/abp.ng.saas').then(m => m.createRoutes())
- @volo/abp.ng.audit-logging → import('@volo/abp.ng.audit-logging').then(m => m.createRoutes())
- @volo/abp.ng.language-management → import('@volo/abp.ng.language-management').then(m => m.createRoutes())
- @volo/abp.ng.text-template-management → import('@volo/abp.ng.text-template-management').then(m => m.createRoutes())
- @volo/abp.ng.account (public/admin where applicable) → import('@volo/abp.ng.account').then(m => m.createRoutes())
- Any other ABP/Commercial Angular feature package that exposes createRoutes
 
 Example const routes: Routes = [ { path: 'identity', loadChildren: () => import('@volo/abp.ng.identity').then(m => m.createRoutes()) }, { path: 'saas', loadChildren: () => import('@volo/abp.ng.saas').then(m => m.createRoutes()) }, { path: 'audit-logging', loadChildren: () => import('@volo/abp.ng.audit-logging').then(m => m.createRoutes()) }, { path: 'language-management', loadChildren: () => import('@volo/abp.ng.language-management').then(m => m.createRoutes()) }, { path: 'text-template-management', loadChildren: () => import('@volo/abp.ng.text-template-management').then(m => m.createRoutes()) }, { path: 'account', loadChildren: () => import('@volo/abp.ng.account').then(m => m.createRoutes()) }, ]; Notes - You can still keep your app as module-based overall. The key is that feature routes must come from createRoutes so those standalone components receive their providers.
- Do not import or declare feature components directly; always navigate via the routes returned by createRoutes.
- Keep the corresponding provideXxxConfig() (e.g., provideSaasConfig) at the root providers as you already do.
 - Sources
 - ABP community article describing the switch from forLazy() to createRoutes in feature packages: https://abp.io/community/articles/zzi2rr2z
 
 This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon. 
 
                                