CirclonGroup / angular-tree-component

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

Error Mobx-angular Angular 9 RC12 #788

Closed hartjo closed 4 years ago

hartjo commented 4 years ago

Additional Info

Package.json

{ "name": "apts-frontend", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve --open", "start:dev": "npm run start -- --configuration=dev", "start:deploy": "npm run start -- --configuration=deploy", "start:http-server": "npm run build && http-server -g -p 4200 ./dist/apts-frontend", "start:dev:http-server": "npm run build:dev && http-server -g -p 4200 ./dist/apts-frontend", "start:deploy:http-server": "npm run build:deploy && http-server -g -p 4200 ./dist/apts-frontend", "start:analyze": "npm run build:analyze && webpack-bundle-analyzer ./dist/apts-frontend/stats.json", "build": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build", "build:dev": "npm run build -- --configuration=dev", "build:prod": "npm run build -- --configuration=deploy", "build:analyze": "npm run build -- --configuration=production --stats-json=true", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^9.0.0-rc.12", "@angular/common": "^9.0.0-rc.12", "@angular/compiler": "^9.0.0-rc.12", "@angular/core": "^9.0.0-rc.12", "@angular/forms": "^9.0.0-rc.12", "@angular/platform-browser": "^9.0.0-rc.12", "@angular/platform-browser-dynamic": "^9.0.0-rc.12", "@angular/router": "^9.0.0-rc.12", "@auth0/angular-jwt": "^3.0.1", "@ng-bootstrap/ng-bootstrap": "^5.1.0", "@ng-select/ng-select": "^3.0.7", "@ngrx/effects": "^8.3.0", "@ngrx/router-store": "^8.3.0", "@ngrx/store": "^8.3.0", "@nicky-lenaers/ngx-scroll-to": "^3.0.1", "@sweetalert2/ngx-sweetalert2": "^5.1.0", "angular-tree-component": "^8.5.2", "blob-util": "^2.0.2", "bootstrap": "^4.3.1", "classlist.js": "^1.1.20150312", "core-js": "^2.4.1", "file-saver": "^2.0.2", "immer": "^3.2.0", "jquery": "^3.4.1", "jquery-ui": "^1.12.1", "jquery-ui-dist": "^1.12.1", "lodash": "^4.17.15", "moment": "^2.24.0", "ng-select2": "^1.1.2", "ng2-password-strength-bar": "^1.2.3", "ngx-bootstrap": "^5.1.1", "ngx-device-detector": "^1.3.9", "ngx-file-drop": "^8.0.8", "ngx-filesize": "^1.1.4", "ngx-mask": "^8.0.3", "ngx-progressive-image-loader": "^3.0.2", "ngx-toastr": "^11.3.2", "ngx-window-token": "^2.0.1", "popper.js": "^1.16.0", "pretty-checkbox": "^3.0.3", "rxjs": "6.5.3", "select2": "^4.0.10", "sweetalert2": "^8.16.2", "tslib": "^1.10.0", "web-animations-js": "^2.3.2", "zone.js": "~0.10.2", "zxcvbn": "^4.4.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.900.0-rc.12", "@angular/cli": "^9.0.0-rc.12", "@angular/compiler-cli": "^9.0.0-rc.12", "@ngrx/schematics": "^8.3.0", "@ngrx/store-devtools": "^8.3.0", "@types/jasmine": "^3.4.0", "@types/jasminewd2": "^2.0.6", "@types/jquery": "^3.3.31", "@types/jqueryui": "^1.12.7", "@types/node": "^12.11.1", "@types/select2": "^4.0.48", "codelyzer": "^5.1.2", "http-server": "^0.11.1", "jasmine-core": "^3.4.0", "jasmine-spec-reporter": "^4.2.1", "karma": "^4.2.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", "nswag": "^12.3.1", "protractor": "^5.4.2", "ts-node": "^8.3.0", "tslint": "^5.19.0", "typescript": "3.7.5", "webpack-bundle-analyzer": "^3.4.1" } }

-ERROR in Failed to compile entry-point angular-tree-component (module as esm5) due to compilation errors: node_modules/mobx-angular/dist/mobx-angular.d.ts:5:22 - error NG6002: Appears in the NgModule.imports of TreeModule, but could not be resolved to an NgModule class

5 export declare class MobxAngularModule {

Use the Slack Channel

The fastest way to get an answer is via the slack channel: https://angular-tree-component.herokuapp.com/

You will also get updates on releases, bugfixes and other announcements.

Search Docs First

Please look for an answer in the docs before submitting an issue: angular2-tree.readme.io.

Rkubisiak commented 4 years ago

ive got the same issue when using rc14

kkuriata commented 4 years ago

Same issue with 9.0.0 release.

[edit]

Found this issue on mobx-angular: https://github.com/mobxjs/mobx-angular/issues/112

juliocardosoventura commented 4 years ago

ERROR in Failed to compile entry-point angular-tree-component (module as esm5) due to compilation errors: node_modules/angular-tree-component/node_modules/mobx-angular/dist/mobx-angular.d.ts:5:22 - error NG6002: Appears in the NgModule.imports of TreeModule, but could not be resolved to an NgModule class

5 export declare class MobxAngularModule {

"@angular/core": "~9.0.0", "mobx-angular": "3.1.0", "mobx-angular": "3.0.3",

How do you fix this... it’s still a problem!

KeithGillette commented 4 years ago

We are facing the same issue with Angular 9 and have to disable Ivy in tsconfig.app.json:

    "angularCompilerOptions": {
        "enableIvy": false,
    },
LanderBeeuwsaert commented 4 years ago

jep, same same

sgruhier commented 4 years ago

same. to bad to disable ivy for this

martinpagesaal commented 4 years ago

Same here! Any solution?

michaill commented 4 years ago

there is very new mobx-angular@3.1.1 solving this issue. please can you make new package of angular-tree-component?

hugoj-goncalves commented 4 years ago

I'm having the same issue even with mobx-angular@3.1.1 😢 Are you sure it was solved?

martinpagesaal commented 4 years ago

I'm working in a angular-tree-component and mobx-angular upgrade to A9, as soon as I have it i'll create PRs and share branch here if anyone wants to use it.

If someone has this already please let me know so I do not duplicate my work.

martinpagesaal commented 4 years ago

Update: Just FYI, tried to use 3.1.1 and did not worked. I'll need to fork mobx-angular now.

sgruhier commented 4 years ago

I tried locally with "mobx-angular": "3.1.1" and it worked. It would be nice if someone from 500tech have a look and publish a new version

martinpagesaal commented 4 years ago

I tried locally with "mobx-angular": "3.1.1" and it worked. It would be nice if someone from 500tech have a look and publish a new version

Did you forked or something? I could not make it work, same issue.

sgruhier commented 4 years ago

no, I did a quick and dirty test by copying files in my project. I'm gonna fork it and see if I can make it work

sgruhier commented 4 years ago

no chance for now, and it's the end of the day for me

martinpagesaal commented 4 years ago

For right now as a temp solution you guys can use my branch with the fix, made it work

This should work:

npm uninstall angular-tree-component
npm install git+ssh://git@github.com/martinpagesaal/angular-tree-component#angular-9-dist
adamkleingit commented 4 years ago

Released 8.5.4 Would be nice if someone does a PR to upgrade example/cli Angular version to 9

adamkleingit commented 4 years ago

I added cli9 example, but it would still be good if we change the main cli to be version 9, because that's where we run all the tests. So either migrate example/cli to 9, or recreate all the routes and components in the new cli9

korolevsa commented 4 years ago

Hi !

"dependencies": {
"angular-tree-component": "^8.5.4"
}
 "devDependencies": {
"@angular/compiler-cli": "~9.0.0",
}

image

Please tell me how to solve this.

sgruhier commented 4 years ago

Correct I also have that error @martinpagesaa solution with his repo git+ssh://git@github.com/martinpagesaal/angular-tree-component#angular-9-dist worked for me

shreykene commented 4 years ago

Hi, "dependencies": { "angular-tree-component": "^8.5.4" } "devDependencies": { "@angular/compiler-cli": "~9.0.0", }

I have updated the existing dist folder with #angular-9-dist but still not succeeded. Please tell me how to solve this.

hartjo commented 4 years ago

Hi, "dependencies": { "angular-tree-component": "^8.5.4" } "devDependencies": { "@angular/compiler-cli": "~9.0.0", }

I have updated the existing dist folder with #angular-9-dist but still not succeeded. Please tell me how to solve this.

can you confirm that the version of your Mobx and Mobx-angular is same as the new one?

mobx@4.15.4 mobx-angular@3.1.1

there is a new update from angular-tree-component. I've got those about an hour ago

wupaz commented 4 years ago

Same prob here I delete node module delete package-lock.json and re-install

  "angular-tree-component": {
      "version": "8.5.4",
      "resolved": "https://registry.npmjs.org/angular-tree-component/-/angular-tree-component-8.5.4.tgz",
      "integrity": "sha512-HLAxFMjv4gPH80565/6XhO8/ZPfejX9gadPzigmY2pen0rka1eQXz9sAauFm9sb6y/nM8l7U1q6uly24ysaiOw==",
      "requires": {
        "lodash": "^4.17.11",
        "mobx": "^4.15.1",
        "mobx-angular": "3.1.1"
      }
hartjo commented 4 years ago

I haven't tried the new version yet cause we are on a tight schedule for production release so we are in ivy false right now.

korolevsa commented 4 years ago

npm list --depth=0

+-- @angular-devkit/build-angular@0.900.1
+-- @angular/animations@9.0.0
+-- @angular/cli@9.0.1
+-- @angular/common@9.0.0
+-- @angular/compiler@9.0.0
+-- @angular/compiler-cli@9.0.0
+-- @angular/core@9.0.0
+-- @angular/forms@9.0.0
+-- @angular/language-service@9.0.0
+-- @angular/platform-browser@9.0.0
+-- @angular/platform-browser-dynamic@9.0.0
+-- @angular/router@9.0.0
+-- @types/jasmine@3.5.3
+-- @types/jasminewd2@2.0.8
+-- @types/node@12.12.27
+-- angular-tree-component@8.5.4
+-- codelyzer@5.2.1
+-- UNMET PEER DEPENDENCY core-js@^2.4.1
+-- 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.1
+-- karma-jasmine@2.0.1
+-- karma-jasmine-html-reporter@1.5.2
+-- mobx@4.15.4
+-- mobx-angular@3.1.1
+-- protractor@5.4.3
+-- rxjs@6.5.4
+-- ts-node@8.3.0
+-- tslib@1.10.0
+-- tslint@5.18.0
+-- typescript@3.7.5
`-- zone.js@0.10.2

ng build

image

npm -v
6.9.0
node -v
v10.16.3
adamkleingit commented 4 years ago

@sgruhier @korolevsa can you send a link to reproduce? It works inside example/cli9: https://github.com/500tech/angular-tree-component/tree/master/example/cli9

hugoj-goncalves commented 4 years ago

It doesn't work here also... Even the example fails... https://github.com/500tech/angular-tree-component/tree/master/example/cli9 Which node/npm version are you using for curiosity?

npm -v
6.13.4
node -v
v12.16.0

OS: Windows 10 - 19041.84
korolevsa commented 4 years ago
ng new test-at -g --style=scss
npm install --save mobx@4.15.4 mobx-angular@3.1.1 angular-tree-component

copy steps from https://angular2-tree.readme.io/docs/

ng build image


+-- @angular-devkit/build-angular@0.900.1
+-- @angular/animations@9.0.0
+-- @angular/cli@9.0.1
+-- @angular/common@9.0.0
+-- @angular/compiler@9.0.0
+-- @angular/compiler-cli@9.0.0
+-- @angular/core@9.0.0
+-- @angular/forms@9.0.0
+-- @angular/language-service@9.0.0
+-- @angular/platform-browser@9.0.0
+-- @angular/platform-browser-dynamic@9.0.0
+-- @angular/router@9.0.0
+-- @types/jasmine@3.5.3
+-- @types/jasminewd2@2.0.8
+-- @types/node@12.12.27
+-- angular-tree-component@8.5.4
+-- codelyzer@5.2.1
+-- UNMET PEER DEPENDENCY core-js@^2.4.1
+-- 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.1
+-- karma-jasmine@2.0.1
+-- karma-jasmine-html-reporter@1.5.2
+-- mobx@4.15.4
+-- mobx-angular@3.1.1
+-- protractor@5.4.3
+-- rxjs@6.5.4
+-- ts-node@8.3.0
+-- tslib@1.10.0
+-- tslint@5.18.0
+-- typescript@3.7.5
`-- zone.js@0.10.2

npm -v 6.9.0 node -v v10.16.3

THE TRUTH IS OUT THERE

martinpagesaal commented 4 years ago

Use my branch thill its fixed, mobx 3.1.1 does not work, I had to branch mobx as well.

npm uninstall angular-tree-component
npm install git+ssh://git@github.com/martinpagesaal/angular-tree-component#angular-9-dist
korolevsa commented 4 years ago

Use my branch thill its fixed, mobx 3.1.1 does not work, I had to branch mobx as well.

npm uninstall angular-tree-component
npm install git+ssh://git@github.com/martinpagesaal/angular-tree-component#angular-9-dist

This not work for me. image

martinpagesaal commented 4 years ago

Use my branch thill its fixed, mobx 3.1.1 does not work, I had to branch mobx as well.

npm uninstall angular-tree-component
npm install git+ssh://git@github.com/martinpagesaal/angular-tree-component#angular-9-dist

This not work for me. image

Try normal http.

npm uninstall angular-tree-component
npm install https://github.com/martinpagesaal/angular-tree-component.git#angular-9-dist

This is the repo. https://github.com/martinpagesaal/angular-tree-component

korolevsa commented 4 years ago

Hi, unfortunately, I tried this method. image And it does not work

pmstss commented 4 years ago

@korolevsa it's a separate windows git setup issue unrelated to initial one. Just google for "git windows host key verification failed". Had similar one, hints from https://github.community/t5/How-to-use-Git-and-GitHub/Git-via-SSH-from-Windows-returns-Permission-Denied/td-p/9336 helped to quickly fix it. @martinpagesaal forks work well 👍

adamkleingit commented 4 years ago

Oh very strange. I removed node_modules and re-installed and now it breaks

adamkleingit commented 4 years ago

I fixed it by removing mobx-angular as a dependency and assimilating its code inside. Please use 8.5.6 and let me know if there are any issues

sgruhier commented 4 years ago

it works for me thanks

iliyaeffati commented 4 years ago

it works perfectly, thanks

korolevsa commented 4 years ago

It works for me. Thanks/

adamkleingit commented 4 years ago

Thanks everyone! I'm glad it works and we can now use the tree in Angular 9 :) I still don't know what caused the problem though. Very strange because mobx-angular by itself works OK with Angular 9, so it's weird that using it from here fails

rahulroykumar commented 4 years ago

@adamkleingit with "postinstall": "ngcc" it works fine but Tree component fails when using below postinstall script:

ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points"

image

can you please suggest? I need to create ivy entry points

debender495 commented 4 years ago

I fixed it by removing mobx-angular as a dependency and assimilating its code inside. Please use 8.5.6 and let me know if there are any issues

with this version, it gives below error

node_modules/mobx/lib/api/flow.d.ts:9:108 - error TS2304: Cannot find name 'AsyncGenerator'.

9 export declare function flow<R, Args extends any[]>(generator: (...args: Args) => Generator<any, R, any> | AsyncGenerator<any, R, any>): (...args: Args) => CancellablePromise<R>;
                                                                                                             ~~~~~~~~~~~~~~
debender495 commented 4 years ago

with the latest version 8.5.6 of angular-tree-component, I get below error with angular 9

node_modules/mobx/lib/api/flow.d.ts:9:108 - error TS2304: Cannot find name 'AsyncGenerator'.

9 export declare function flow<R, Args extends any[]>(generator: (...args: Args) => Generator<any, R, any> | AsyncGenerator<any, R, any>): (...args: Args) => CancellablePromise<R>;
                                                                                                             ~~~~~~~~~~~~~~

some type crap,

gmaggiodev commented 4 years ago

Same issue with Angular 10

image