打开 关闭

In the microservice solution of v7.0.0-rc.4, you cannot start the angular application. #4219


User avatar
0
chenxm 创建
  • ABP Framework version: v7.0.0-rc.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

...

Error: node_modules/@volo/abp.ng.text-template-management/lib/components/abstract-template-content/abstract-template-content.component.d.ts:23:18 - error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments.

23 static ɵcmp: i0.ɵɵComponentDeclaration<AbstractTemplateContentComponent, "ng-component", never, {}, {}, never, never, false, never>; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/@volo/abp.ng.text-template-management/lib/components/inline-template-content/inline-template-content.component.d.ts:12:18 - error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments.

12 static ɵcmp: i0.ɵɵComponentDeclaration<InlineTemplateContentComponent, "abp-inline-template-content", never, {}, {}, never, never, false, never>; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/@volo/abp.ng.text-template-management/lib/components/template-contents/template-contents.component.d.ts:17:18 - error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments.

17 static ɵcmp: i0.ɵɵComponentDeclaration<TemplateContentsComponent, "abp-template-contents", never, {}, {}, never, never, false, never>; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/@volo/abp.ng.text-template-management/lib/components/text-templates/text-templates.component.d.ts:16:18 - error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments.

16 static ɵcmp: i0.ɵɵComponentDeclaration<TextTemplatesComponent, "abp-text-templates", never, {}, {}, never, never, false, never>; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/angular-oauth2-oidc/provider.d.ts:1:10 - error TS2305: Module '"@angular/core"' has no exported member 'EnvironmentProviders'.

1 import { EnvironmentProviders } from '@angular/core';


2 答案
  • User Avatar
    0
    gterdem 创建
    支持团队 Senior .NET Developer

    This is about modules using angular v15. We have fixed this problem and will be corrected in the next release.

    You can also make manual changes if you don't want to wait for the next release:

    angular.json:

      ...
      "defaultProject": "MyProjectName",
      // ADD schematics
      "schematics": {
        "@angular-eslint/schematics:application": {
          "setParserOptionsProject": true
        },
        "@angular-eslint/schematics:library": {
          "setParserOptionsProject": true
        }
      }
    

    package.json:

        "@angular/animations": "^14.2.3",
        "@angular/common": "^14.2.3",
        "@angular/compiler": "^14.2.3",
        "@angular/core": "^14.2.3",
        "@angular/forms": "^14.2.3",
        "@angular/localize": "^14.2.3",
        "@angular/platform-browser": "^14.2.3",
        "@angular/platform-browser-dynamic": "^14.2.3",
        "@angular/router": "^14.2.3",
    ===    UPDATE AS BELOW ===
        "@angular/animations": "^15.0.4",
        "@angular/common": "^15.0.4",
        "@angular/compiler": "^15.0.4",
        "@angular/core": "^15.0.4",
        "@angular/forms": "^15.0.4",
        "@angular/localize": "^15.0.4",
        "@angular/platform-browser": "^15.0.4",
        "@angular/platform-browser-dynamic": "^15.0.4",
        "@angular/router": "^15.0.4",
        
    "devDependencies": {
    ...
        "@angular-devkit/build-angular": "^14.2.3",
        "@angular-eslint/builder": "~14.1.2",
        "@angular-eslint/eslint-plugin": "~14.1.2",
        "@angular-eslint/eslint-plugin-template": "~14.1.2",
        "@angular-eslint/schematics": "~14.1.2",
        "@angular-eslint/template-parser": "~14.1.2",
        "@angular/cli": "^14.2.3",
        "@angular/compiler-cli": "^14.2.3",
        "@angular/language-service": "^14.2.3",
        "@typescript-eslint/eslint-plugin": "^5.36.2",
        "@typescript-eslint/parser": "^5.36.2",
        "eslint": "^8.23.0",
        "ng-packagr": "^14.2.1",
    ===    UPDATE AS BELOW ===
        "@angular-devkit/build-angular": "^15.0.4",
        "@angular-eslint/builder": "~15.1.0",
        "@angular-eslint/eslint-plugin": "~15.1.0",
        "@angular-eslint/eslint-plugin-template": "~15.1.0",
        "@angular-eslint/schematics": "~15.1.0",
        "@angular-eslint/template-parser": "~15.1.0",
        "@angular/cli": "^15.0.4",
        "@angular/compiler-cli": "^15.0.4",
        "@angular/language-service": "^15.0.4",
        "@typescript-eslint/eslint-plugin": "^5.43.0",
        "@typescript-eslint/parser": "^5.43.0",
        "eslint": "^8.28.0",
        "ng-packagr": "^15.0.3",
        
    

    app-routing.module.ts:

    @NgModule({
      imports: [RouterModule.forRoot(routes, {})],--> remove `relativeLinkResolution: 'legacy`
      exports: [RouterModule],
    

    tsconfig.json:

    "target": "ES2022", ---> Update from ES2020
    ...
    "paths": {
      "@proxy": [
        "src/app/proxy/index.ts"
      ],
      "@proxy/*": [
        "src/app/proxy/*"
      ]
    },
    "useDefineForClassFields": false --> Add this line
    
  • User Avatar
    0
    chenxm 创建

    Thank you, I choose to wait.

Made with ❤️ on ABP v8.2.0-preview Updated on 三月 25, 2024, 15:11