AhsanAyaz / ngx-device-detector

An Angular v7+ library to detect the device, OS, and browser details.
https://ahsanayaz.github.io/ngx-device-detector
MIT License
520 stars 101 forks source link

`v2.0.3` is incompatible with Angular 11 #223

Closed akaustav closed 3 years ago

akaustav commented 3 years ago

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 (or yarn) throws compatibility warnings when that version of ngx-device-detector is installed in an Angular 11 application.

To Reproduce

  1. Create a sample Angular 11 application - using @angular/cli@11.2.14

    ng new angular11-test
  2. Install v2.0.3 of ngx-device-detector as a production dependency:

    npm i -E ngx-device-detector@2.0.3
  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

Screenshots

image

Desktop

Additional Context

akaustav commented 3 years ago

The warning does not appear for version 2.0.5 of ngx-device-detector