CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.1k stars 492 forks source link

fail to install for angular 9 and ivy #783

Closed wuboy0307 closed 4 years ago

wuboy0307 commented 4 years ago

https://stackblitz.com/edit/angular-6cuvhn?file=package.json

package.json:

{
  "name": "ng9",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~9.0.0-rc.9",
    "@angular/common": "~9.0.0-rc.9",
    "@angular/compiler": "~9.0.0-rc.9",
    "@angular/core": "~9.0.0-rc.9",
    "@angular/forms": "~9.0.0-rc.9",
    "@angular/platform-browser": "~9.0.0-rc.9",
    "@angular/platform-browser-dynamic": "~9.0.0-rc.9",
    "@angular/router": "~9.0.0-rc.9",
    "rxjs": "~6.5.3",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2",
    "angular-tree-component": "8.5.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.900.0-rc.9",
    "@angular/cli": "~9.0.0-rc.9",
    "@angular/compiler-cli": "~9.0.0-rc.9",
    "@angular/language-service": "~9.0.0-rc.9",
    "@types/node": "^12.11.1",
    "@types/jasmine": "~3.5.0",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "^5.1.2",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.3.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~2.1.0",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.2",
    "protractor": "~5.4.2",
    "ts-node": "~8.3.0",
    "tslint": "~5.18.0",
    "typescript": "~3.6.4"
  }
}

It's a new clean angular 9 (9.0.0-rc.9). The only two things I do in package.json are:

  1. add scripts: "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points"
  2. add dependency: "angular-tree-component": "8.5.2"

after run "npm install", I got following error:

Compiling angular-tree-component : module as esm5
Error: Error on worker #2: TypeError: Cannot read property 'injectorImports' of undefined
    at NgModuleDecoratorHandler.compile (/Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/src/ngtsc/annotations/src/ng_module.js:347:174)
    at _loop_1 (/Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:206:38)
    at DecorationAnalyzer.compileClass (/Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:221:21)
    at /Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:195:41
    at Array.map (<anonymous>)
    at DecorationAnalyzer.compileFile (/Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:194:64)
    at /Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:134:90
    at Array.map (<anonymous>)
    at DecorationAnalyzer.analyzeProgram (/Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:134:47)
    at Transformer.analyzeProgram (/Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/packages/transformer.js:123:57)
    at ClusterMaster.onWorkerMessage (/Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:158:27)
    at /Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:46:95
    at ClusterMaster.<anonymous> (/Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:238:57)
    at step (/Users/wuboy/workspace/ng9/node_modules/tslib/tslib.js:136:27)
    at Object.next (/Users/wuboy/workspace/ng9/node_modules/tslib/tslib.js:117:57)
    at /Users/wuboy/workspace/ng9/node_modules/tslib/tslib.js:110:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/Users/wuboy/workspace/ng9/node_modules/tslib/tslib.js:106:16)
    at EventEmitter.<anonymous> (/Users/wuboy/workspace/ng9/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:232:32)
    at EventEmitter.emit (events.js:198:13)

Please refer to https://github.com/angular/angular/issues/34500#issuecomment-575025087

adamkleingit commented 4 years ago

Hi, please try with angular-tree-component 8.5.4 and Angular 9.0.0 Thanks

adamkleingit commented 4 years ago

Oh wait, still not working. But please follow the duplicate: #788