FAQ

While Installing the Library, I Get an Error About Conflicting Angular Peer Dependencies.

The library depends on several @angular packages. These are defined in package.json in the peerDependencies section. The version of these package might not match the version you are using in your Angular app. This mismatch causes errors like "Conflicting peer dependency …".

There are several things you can do to deal with this issue. Typically you might want to align your Angular version with the version used in the library. Unfortunately this is not possible in every situation for many reasons.

As a temporary workaround it usually helps to add --force to your command (e.g. npm i --force).

You might be wondering when and how we migrate the Angular peer dependencies. Here's the plan to give you a rough idea:

  • The library loosely follows Angular's release cycle. When a new stable major release of Angular is published, we test the library against the new release. This won't affect the published stable versions of the library.
  • As a rule of thumb, the library upgrades the Angular peer dependencies when the first minor version of a given Angular major version is published.
  • Upgrading of the major version of the Angular peer dependencies is a breaking change and thus will result in a major release of the library.
  • Whenever possible, the library shall be compatible with older Angular versions. However new features, fixes and releases of the library are tested against the Angular version declared in peer dependency only.

Here's an example:

  • Once Angular 36.0.0 is released, we will test the library against the new Angular release internally.
  • Given the library's version is 23.4.5 depending on Angular 35.x, we will upgrade the Angular peer dependency to 36.x at around the time Angular 36.1.0 is released. The first stable version of the library including the updated Angular peer dependency will be 24.0.0.

I get a compile-time warning about "CommonJS or AMD dependencies can cause optimization bailouts."

Add core-js, etc. to the list of allowed common js dependencies in your project's angular.json.

Example :
"architect": {
  "build": {
    ...
    "options": {
      "allowedCommonJsDependencies": [
        "core-js",
        "can-use-dom",
        "lodash.debounce",
        "lodash.memoize",
        "lodash.throttle",
      ]
      ...
    }
    ...
  }
}

results matching ""

    No results matching ""