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


12 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.

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

    Thanks for your response! I’m actually using the compatible Angular version. I’ve attached a screenshot showing my current version so you can have a clearer view

    Untitled.png

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

    I noticed that you are using ABP version 9.0. Could you please confirm whether you are using Angular version 18 with this release?

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

    This is my angular v

    image.png

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

    Thank you for confirming your version details.

    As mentioned earlier, ABP 9.0 is compatible with Angular 18. If you wish to leverage the features of Angular 19, you will need to upgrade your project to ABP 9.1.

    In summary:

    • ABP 9.0 supports Angular 18

    • ABP 9.1 supports Angular 19

    Please let me know if you need any further clarification. I appreciate your cooperation.

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

    Thanks for your reply.I already updated the ABP CLI using the following command: .dotnet tool update -g Volo.Abp.Cli. After that, the backend AuthServer app did not start, and I encountered some other issues on the backend.

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

    Can you share more details on that please?

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

    My question is: How can I update the ABP CLI to version 9.1 the right way? To try again.

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

    My question is: How can I update the ABP CLI to version 9.1 the right way? To try again.

    You can use abp cli update command to update your cli. You can also check documentation for more options: https://abp.io/docs/latest/cli#cli

    If you want to update your solution, you can check this part of the documentation: https://abp.io/docs/latest/cli#update

  • User Avatar
    0
    MichelZ created

    It currently has a bug, you might to force the version with --version 9.1.0

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 25, 2025, 11:10