akveo / ngx-admin

Customizable admin dashboard template based on Angular 10+
https://akveo.github.io/ngx-admin/
MIT License
25.28k stars 7.96k forks source link

Why are there missing peer dependencies after a fresh install? #1563

Open aurerua opened 6 years ago

aurerua commented 6 years ago

Issue type

I'm submitting a ... (check one with "x")

Issue description

Current behavior:

ngx-admin currently uses angular 5, yet some included packages require angular 4, as can be shown from these npm warnings after doing npm install:

npm WARN angular2-toaster@4.0.1 requires a peer of @angular/common@^4.0.0 but none was installed.
npm WARN angular2-toaster@4.0.1 requires a peer of @angular/compiler@^4.0.0 but none was installed.
npm WARN angular2-toaster@4.0.1 requires a peer of @angular/core@^4.0.0 but none was installed.
npm WARN bootstrap@4.0.0-beta.2 requires a peer of jquery@1.9.1 - 3 but none was installed.
npm WARN bootstrap@4.0.0-beta.2 requires a peer of popper.js@^1.12.3 but none was installed.
npm WARN ng2-smart-table@1.2.2 requires a peer of @angular/common@^4.0.0 but none was installed.
npm WARN ng2-smart-table@1.2.2 requires a peer of @angular/core@^4.0.0 but none was installed.
npm WARN ng2-smart-table@1.2.2 requires a peer of @angular/forms@^4.0.0 but none was installed.
npm WARN ngx-echarts@2.0.0 requires a peer of echarts@>=3.1.1 but none was installed.

How should these dependencies be resolved?

Expected behavior:

I would expect ngx-admin not to contain missing peer dependencies within its own selection of packages. Is it that the functionality provided by ngx-admin is not affected by the mismatch?

Steps to reproduce:

git clone https://github.com/akveo/ngx-admin.git
npm install
npm install

I did not get any warning after the first npm install. So installing a new package or just running a second time npm install was required to reproduce the issue.

Other information:

npm, node, OS, Browser

node --version
v8.3.0
npm --version
5.3.0

On Windows 7.

nnixaa commented 6 years ago

Hi @aurerua, thanks for reporting. Though sometimes it is normal, for example, bootstrap requires jquery - but we don't use any of bootstrap jquery functions, so it's totally fine here. Or angular2-toaster doesn't have (could have already) a version requiring the latest angular - though working totally fine with the current version.

Anyway, will try to keep the missing peer dependencies list as small as possible.