Open Closed

NullInjectorError: No provider for InjectionToken undefined in Standalone Component #8997


User avatar
0
g.hasan@tatweermea.com created

Hi I am using ABP Framework with Angular, and I encountered the following error when running my application:

ERROR NullInjectorError: R3InjectorError(Standalone[_TenantsComponent])[InjectionToken undefined -> InjectionToken undefined -> InjectionToken undefined -> InjectionToken undefined]:
NullInjectorError: No provider for InjectionToken undefined!
at NullInjector.get (core.mjs:1652:21)
at R3Injector.get (core.mjs:2176:27)
at R3Injector.get (core.mjs:2176:27)
at R3Injector.get (core.mjs:2176:27)
at R3Injector.get (core.mjs:2176:27)
at ChainedInjector.get (core.mjs:4733:32)
at lookupTokenUsingModuleInjector (core.mjs:5076:31)
at getOrCreateInjectable (core.mjs:5122:10)
at ɵɵdirectiveInject (core.mjs:16839:17)
at ɵɵinject (core.mjs:1114:40)

Context:
ABP V "@abp/ng.core": "~9.0.4",
Angular 19
I am working with ABP Angular UI.
_TenantsComponent is a standalone component. This error occurs when navigating to the Tenants Management page.

My Question Is:
What could be causing this error in ABP Angular?

Untitled.png


3 Answer(s)
  • User Avatar
    0
    erdem.caygor created
    Support Team

    Hello,

    Thank you for reporting this issue. Could you please share the content of your _TenantsComponent.ts file?

  • User Avatar
    0
    g.hasan@tatweermea.com created

    Hello,

    Thank you for your response. I did not create _TenantsComponent.ts myself; it comes as part of the ABP Framework. Could you guide
    me on where I can locate it, or if there are any required configurations I might have missed?

    Additionally, I would like to know if this issue is related to missing providers or incorrect module imports.

    The error occurs when I click on SaaS > Tenants in the application.

    image.png

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    What could be causing this error in ABP Angular?

    Hello, this problem occurs because of your angular version. That is to say, ABP version 9.0 supports Angular version 18. If you want to use Angular v19, you need to use the latest ABP version that is 9.1.

    You can follow the release notes and migration guide to sustain version compatibility.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00