From the compatibility table in current README.md file, version 2.0.3 of ngx-device-detector is supposed to be compatible with Angular 11.
However, npm (or yarn) throws compatibility warnings when that version of ngx-device-detector is installed in an Angular 11 application.
To Reproduce
Create a sample Angular 11 application - using @angular/cli@11.2.14
ng new angular11-test
Install v2.0.3 of ngx-device-detector as a production dependency:
npm i -E ngx-device-detector@2.0.3
Notice the warning:
npm WARN ngx-device-detector@2.0.3 requires a peer of @angular/common@>=7.0.0 <9.0.0 || ^9.0.0-0 ||^10.0.11 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-device-detector@2.0.3 requires a peer of @angular/core@>=7.0.0 <9.0.0 || ^9.0.0-0 || ^10.0.11 but none is installed. You must install peer dependencies yourself.
Expected behavior
Perhaps v2.0.3 of ngx-device-detector was indented to be compatible with Angular 11, but as of right now it is not compatible.
Or perhaps the README.md file has a typo and it should be fixed for folks trying to migrate into Angular 11 in the future.
Maybe a different version of is ngx-device-detector is compatible with Angular 11?
Screenshots
Desktop
OS: Windows 10 64-bit
Browser: Not Applicable
NodeJS Version:14.17.0
Angular CLI Version:11.2.14
Additional Context
When using yarn as the package manager (instead of npm), the warning message says:
Describe the bug
From the compatibility table in current README.md file, version 2.0.3 of
ngx-device-detector
is supposed to be compatible with Angular 11. However,npm
(oryarn
) throws compatibility warnings when that version ofngx-device-detector
is installed in an Angular 11 application.To Reproduce
Create a sample Angular 11 application - using
@angular/cli@11.2.14
Install
v2.0.3
ofngx-device-detector
as a production dependency:Notice the warning:
Expected behavior
ngx-device-detector
is compatible with Angular 11?Screenshots
Desktop
14.17.0
11.2.14
Additional Context
When using
yarn
as the package manager (instead ofnpm
), the warning message says: