Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Upgrading abp-ng-module from 6.4.0 to 9.0.0 is causing a console error "abp is not defined" #11680


User avatar
0
alanshumnz created

We have an application running on angular with NX.

We have recently upgraded from Angular 13 to 16. As part of this upgrade we have also upgraded abp-ng2-module 9.0.0 for compatibility. The application compiles OK, with no errors and no warnings related to ABP. However, when visiting the application in the browser I get no response but a console error: 'abp is not defined'. This seems to be an identical scenario as this ticket: https://support.aspnetzero.com/QA/Questions/11417/ReferenceError-abp-is-not-defined

I have installed abp-web-resources module but this made no difference. I'm not sure if I am missing an import. I have created and downloaded a sample bundle of v12.3.1 and cross-referenced the appPreBootstrap.ts and typings.d.ts files to find any clues but cannot find a solution.

Are there any recommendations you can offer for narrowing down this issue?


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Do you have "src/assets/abp-web-resources/abp.js", in your angular.json file ? If so, is it possible to access your source code and test this on your project ?

  • User Avatar
    0
    alanshumnz created

    Yes, this is present. We have an equivalent project.json (due to using NX) file which contains this. I have replaced this file (abp.js) and all other files in the assets folder with the most up-to-date versions after running into this issue.

    This is not a project I can share. And it's not easy to create a simple repro.

    I am happy to provide files or snippets to work out what the issue is.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @alanshumnz

    Is it possible to arrange an online meeting ? We can check the problem on your PC. If so, please send an email to [email protected].

    Thanks,

  • User Avatar
    0
    alanshumnz created

    Hi, this ticket can be closed. I was using temporarily using an angular.json file to run a migration which was overriding my project.json file containing the abp imports. Once it was deleted, it started working.