Starts in:
2 DAYS
3 HRS
7 MIN
48 SEC
Starts in:
2 D
3 H
7 M
48 S
Open Closed

cannot set properties of undefined (setting 'efac') #5952


User avatar
0
khalid created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

  • ABP Framework version: v7.4
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue: hi all I update my project frontend and backend to v7.4 and and both are working fine in my local machine

but after deployment I got an error in angular application the page still loading and I got this error in console cannot set properties of undefined (setting 'efac')


7 Answer(s)
  • User Avatar
    0
    mahmut.gundogdu created

    Can you give me minimal steps to produce the issue ?

    what was the your abp version. What is your current ABP version ? 7.4 ? (I just want to sure) Can you share your package.json? did you remove the lock file after the update ?

  • User Avatar
    0
    khalid created

    yes I removed the the lock file

    1- I run 'abp update' in the top root directory of my application and then start update all package related to abp from 7.2.1 to 7.4 2 -backend side add migration and update databse 3- run backend and frontend in my local machine and its work fine 4- deploy backend into server and both authServer and swagger works fine 5- deploy angular by run 'yarn build:prod' and moves dist file into server 6- browse angule url and give me the same error

    actullay I tried to create new project based in version 7.4 and its work fine in local machine but after deployedit give same error!!! this package.json

    {
      "name": "Pms",
      "version": "0.0.0",
      "scripts": {
        "ng": "ng",
        "start": "ng serve --open",
        "build": "ng build",
        "build:prod": "ng build --configuration production",
        "watch": "ng build --watch --configuration development",
        "test": "ng test",
        "lint": "ng lint"
      },
      "private": true,
      "dependencies": {
        "@abp/ng.components": "~7.4.0",
        "@abp/ng.core": "~7.4.0",
        "@abp/ng.oauth": "~7.4.0",
        "@abp/ng.setting-management": "~7.4.0",
        "@abp/ng.theme.shared": "~7.4.0",
        "@volo/abp.commercial.ng.ui": "~7.4.0",
        "@volo/abp.ng.account": "~7.4.0",
        "@volo/abp.ng.audit-logging": "~7.4.0",
        "@volo/abp.ng.gdpr": "~7.4.0",
        "@volo/abp.ng.identity": "~7.4.0",
        "@volo/abp.ng.openiddictpro": "~7.4.0",
        "@volo/abp.ng.language-management": "~7.4.0",
        "@volo/abp.ng.saas": "~7.4.0",
        "@volo/abp.ng.text-template-management": "~7.4.0",
        "@volosoft/abp.ng.theme.lepton-x": "~2.4.0-rc.4",
        "@angular/animations": "~16.0.0",
        "@angular/common": "~16.0.0",
        "@angular/compiler": "~16.0.0",
        "@angular/core": "~16.0.0",
        "@angular/forms": "~16.0.0",
        "@angular/localize": "~16.0.0",
        "@angular/platform-browser-dynamic": "~16.0.0",
        "@angular/platform-browser": "~16.0.0",
        "@angular/router": "~16.0.0",
        "rxjs": "7.5.6",
        "tslib": "^2.1.0",
        "zone.js": "~0.13.0"
      },
      "devDependencies": {
        "@abp/ng.schematics": "~7.4.0",
        "@angular-devkit/build-angular": "~16.0.0",
        "@angular-eslint/builder": "~16.0.0",
        "@angular-eslint/eslint-plugin": "~16.0.0",
        "@angular-eslint/eslint-plugin-template": "~16.0.0",
        "@angular-eslint/schematics": "~16.0.0",
        "@angular-eslint/template-parser": "~16.0.0",
        "@angular/cli": "~16.0.0",
        "@angular/compiler-cli": "~16.0.0",
        "@angular/language-service": "~16.0.0",
        "@types/jasmine": "~3.6.0",
        "@types/node": "^12.11.1",
        "@typescript-eslint/eslint-plugin": "^5.36.2",
        "@typescript-eslint/parser": "^5.36.2",
        "eslint": "^8.23.0",
        "jasmine-core": "~4.0.0",
        "karma": "~6.3.0",
        "karma-chrome-launcher": "~3.1.0",
        "karma-coverage": "~2.1.0",
        "karma-jasmine": "~4.0.0",
        "karma-jasmine-html-reporter": "^1.7.0",
        "ng-packagr": "^16.0.1",
        "typescript": "~5.0.4"
      }
    }
    
  • User Avatar
    0
    LarryLin created

    @mahmut.gundogdu

    I have same issue, It cause by volo-abp.ng.account-public-proxy.mjs Then this.efac be seted ,but this is undefined! And it would error. I guess it property newest typescript synta to cause it.

    Our team problem is some environment could successfully and some environment would error!

  • User Avatar
    0
    mahmut.gundogdu created

    I have tested in my local local. I have abp update, Then I copied your packaged.json. it works in my local.

    i use Yarn insead of npm. maybe the problem related it that. Could you try with yarn and remove .angular folder, package.lock , yarn.lock and package.json ?

  • User Avatar
    0
    mahmut.gundogdu created

    I thought I found the main issue. But I couldn't yet. I am working on it. I have removed the answer

  • User Avatar
    0
    mahmut.gundogdu created

    I thought I found the main issue. But I couldn't yet. I am working on it. I have removed the answer (second time)

  • User Avatar
    0
    mahmut.gundogdu created

    I have created issue in my local. When I upgrade Angular for my application from 16.0 to 16.2. It have fixed. There appears to be a version conflict with Angular (likely caused by third-party software). Are you able to try it? and have the solution approved?

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06