- ABP Framework version: v8.3.2
- UI Type: Angular
- Database System: EF Core (SQL Server, PostgreSQL)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
 
After upgrading from ABP 8.2.3 to 8.3.2, I encountered a runtime error related to dependency injection. The error appears when launching the application and states:
RuntimeError: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`.
The error seems to originate from services like ToasterService and LinkLoginHandler. Prior to the upgrade, the application was working without this issue. I've attached a screenshot of the console output for reference.
Steps to Reproduce:
- Upgrade from ABP 8.2.3 to 8.3.2.
- Start the Angular application.
- Observe the console logs for the injection-related errors.
Expected Behavior: The application should run without dependency injection errors after the upgrade.
Actual Behavior: The application fails to properly inject services, leading to runtime errors and a disrupted user experience.
Note: We are using the Lepton theme in our Angular project Also, could you provide guidance on how to specify the Lepton theme when creating a new project using the ABP CLI? The current documentation only mentions creating projects with the --theme parameter for Basic or Lepton-X themes. However, we are specifically using the Lepton theme. How should the command be structured to use Lepton as the theme?
31 Answer(s)
- 
    0Summeye.Kurtulus, I'm experiencing the same issue. I tried using --legacy-peer-depth, but the problem persists. Is it better to ask about this here, or should I create a new ticket since my issue is quite similar? 
- 
    0Thank you for your patience, and I apologize for the delayed response. This problem has been fixed and will be available for the next version. May I know whether you get the same error even if you use the --legacy-peer-depsoption?
- 
    0Hi all clients in this question, about the npm installproblem, Have you tried withyarn installcommand this behavior ?
- 
    0Thank you for your patience, and I apologize for the delayed response. This problem has been fixed and will be available for the next version. May I know whether you get the same error even if you use the --legacy-peer-depsoption?Hi, I also get an error when I try with --legacy-peer-deps
- 
    0Hi all clients in this question, about the npm installproblem, Have you tried withyarn installcommand this behavior ?Hi, There is no problem when using yarn. The problem is related to npm. 
- 
    0Hi again, if you wanna use npm, currently you need to pass --legacy-peer-depsargument. Command must be likenpm i --legacy-peer-depswe'll also planing to change our system fromyarntonpmby default. We're working on install packages withou argument yet currently we need to use this.
 
                                