The `ember-cli-version-checker` package is a fundamental utility for Ember CLI addon authors. It provides a robust mechanism to programmatically determine the installed versions of NPM or (historically) Bower packages within a consuming Ember application's dependency tree. This allows addons to implement conditional logic, such as providing different features, templates, or polyfills, based on the host application's Ember CLI or Ember.js version, thus ensuring broad compatibility. The current stable version is 5.1.2, with releases occurring on an as-needed basis for bug fixes and minor enhancements rather than a fixed cadence. Its core differentiator lies in its deep integration with the Ember CLI project context, simplifying complex semver comparisons for specific dependencies.
npm install ember-cli-version-checkerVerified import paths — ran on the pinned version, not inferred.
Demonstrates initializing `VersionChecker` within an Ember CLI addon's hooks, asserting minimum dependency versions, and conditionally loading resources based on the host application's Ember.js version.
Upgrade your Node.js environment to a compatible version (e.g., Node.js 12.x LTS or higher).
Ensure `new VersionChecker(this.project)` is called from within an Ember CLI addon's environment where `this.project` is available.
Prioritize checking NPM dependencies. If you still rely on Bower, consider migrating to NPM/Yarn.
Always use the latest stable version of `ember-cli-version-checker` (currently 5.1.2) to benefit from bug fixes and improvements, especially for `hasSingleImplementation`.
Ensure `VersionChecker` is called with `new VersionChecker(this.project)` within the scope of an Ember CLI addon or similar project context.
The user of your addon needs to upgrade the specified dependency in their application's `package.json` to meet the minimum version requirement.
Verify the dependency name is spelled correctly and that it is listed in the application's `package.json` and installed via `npm install` or `yarn install`.
No dependency data recorded yet.