abp icon indicating copy to clipboard operation
abp copied to clipboard

Angular UI project - @swimlane/ngx-datatable incompatible to rxjs version

Open BeckerTim opened this issue 4 years ago • 10 comments

ABP Framework version 5.3.0 Angular UI Database provider: EF Core An unhandled exception occurred: ENOENT: no such file or directory, lstat 'C:\abp\angular\node_modules@swimlane'

  1. abp new someProject -u angular
  2. Npm Install
  3. Ng serve

Hello, I had some issues with the Angular UI. I created a new Project and followed the instructions of the tutorial https://docs.abp.io/en/abp/latest/Getting-Started-Running-Solution?UI=NG&DB=EF&Tiered=No

I tried to start the angular app and got the mentioned error. I found a solution by updating the rxjs version. Afterwards i had to install the module with the legacy peer deps command.

Can anyone recreate this issue?

Kind regards, Tim B.

BeckerTim avatar Jun 16 '22 11:06 BeckerTim

I have tried "yarn" and it works without issue. When I use npm, CLI throws warnings. but still, the app is working. Also, I didn't get a warning or an error related to Rxjs.
I couldn't produce your case. image

Not: I've closed accidentally

mahmut-gundogdu avatar Jun 17 '22 08:06 mahmut-gundogdu

Thank you very much.

I tried it again today and ran into the same issue. Maybe its about the node / npm version:

I use npm on version 8.3.1. On npm install i received the same warnings as you but it ran trough. On ng serve still the same error. image

Once installed the missing module it started compiling resulting in a bunch of errors like this: image

I saw there was an issue due to that error at the swimlane repo aswell this february. (https://github.com/swimlane/ngx-datatable/issues/2073)

the local rxjs version is currently 6.6.0 it should be 7.4.0 or higher.

BeckerTim avatar Jun 17 '22 09:06 BeckerTim

What is your node and npm version ? I am a little bit confused about the issue. I have checked ng-theme-shared uses simlane/ngx-datatable version is 19. https://github.com/abpframework/abp/blob/rel-5.3/npm/ng-packs/packages/theme-shared/package.json

and ngx-datatable v19 uses rxjs 6.6 https://github.com/swimlane/ngx-datatable/blob/release/19.0.0/package.json

image

Can you share your project or can you create a empty new project and upload them ? Because I couldn't produce yet.

mahmut-gundogdu avatar Jun 17 '22 10:06 mahmut-gundogdu

npm version - 8.3.1

node version - 16.14.0

In compairsion to your image i am missing two packages while npm install.

image

the two packages missing are those who raised as npm warnings.

BeckerTim avatar Jun 17 '22 11:06 BeckerTim

yarn worked fine but also mentioned warings with ng-bootstrap and ngx-datatables. image

BeckerTim avatar Jun 17 '22 12:06 BeckerTim

yarn worked fine but also mentioned warings with ng-bootstrap and ngx-datatables. image

I took a deeper look inside the ng-packs folder and wittnessed ng.theme.shared and ng.components both refer to the dependancies in ng.core which refers to packs/utils

it seems it is in angular v10

image

maybe this is causing the issue

BeckerTim avatar Jun 17 '22 12:06 BeckerTim

It seems to me that the error is coming from the following:

  • @abp/ng.account (v5.3.0) has dependency on -> @abp/ng.account.core (v.5.3.0) & @abp/ng.theme.shared(v.5.3.0)

  • @abp/ng.account.core (v.5.3.0) has dependency on -> @angular/core & @angular/common >= v12.0.0 (*)

=> This is important that @abp/ng.theme.shared depends on @swimlane/ngx-datatable (@v.19.0.0) => Due to using @swimlane@[email protected] has dependencies on @angular (~11.0.2) (**).

From (*) & (**) so that there is the conflict with @abp/ng.account.core (in use @angular v12) and @swimlane is in use @angular v11.

image

The solution is to migrate @swimlane/ngx-datatable to v20.0.0

nguyenhmtriet avatar Jun 17 '22 17:06 nguyenhmtriet

It seems to me that the error is coming from the following:

  • @abp/ng.account (v5.3.0) has dependency on -> @abp/ng.account.core (v.5.3.0) & @abp/ng.theme.shared(v.5.3.0)
  • @abp/ng.account.core (v.5.3.0) has dependency on -> @angular/core & @angular/common >= v12.0.0 (*)

=> This is important that @abp/ng.theme.shared depends on @swimlane/ngx-datatable (@v.19.0.0) => Due to using @swimlane@[email protected] has dependencies on @angular (~11.0.2) (**).

From (*) & (**) so that there is the conflict with @abp/ng.account.core (in use @angular v12) and @swimlane is in use @angular v11.

image

The solution is to migrate @swimlane/ngx-datatable to v20.0.0

Indeed, but this wont do it at all.

  1. abp/ng.theme.shared -> @ng-bootstrap/ng-bootstrap v12.0.2 -> angular 13
  2. abp/ng.theme.shared -> @swimlane/ngx-datatable 19.0.0 -> angular 11 / 20.0.0 angular 12
  3. abp/ng.theme.shared -> @abp/ng.core ~5.3.0 -> @abp/utils-> angular ~ 10

Even if we migrate ngx-datatables to v 20.0.0 we will have issues because the version of ng-bootstrap depends on another angular version.

BeckerTim avatar Jun 17 '22 18:06 BeckerTim

Yes, I see so, which is the best version on @abpframewok I can use with the angular app version 12?

nguyenhmtriet avatar Jun 18 '22 02:06 nguyenhmtriet

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 22 '22 03:09 stale[bot]