{"id":17583,"library":"ember-cli-dependency-checker","title":"Ember CLI Dependency Checker","description":"ember-cli-dependency-checker is an Ember CLI addon designed to safeguard development workflows by automatically detecting and alerting developers to missing npm, pnpm, and historically, bower dependencies within an Ember project. It executes these checks before crucial `ember` commands run, preventing common errors and ensuring a consistent development environment. The latest stable version is 3.4.0. Releases are irregular, driven primarily by bug fixes, internal dependency updates, and enhancements like new package manager support (e.g., pnpm). Its key differentiator is its deep integration into the Ember CLI ecosystem, providing pre-command validation that other generic dependency checkers might not offer in the same seamless way.","status":"active","version":"3.3.3","language":"javascript","source_language":"en","source_url":"https://github.com/adopted-ember-addons/ember-cli-dependency-checker","tags":["javascript","bower","check","dependency","ember","ember-addon","ember-cli","node","npm"],"install":[{"cmd":"npm install ember-cli-dependency-checker","lang":"bash","label":"npm"},{"cmd":"yarn add ember-cli-dependency-checker","lang":"bash","label":"yarn"},{"cmd":"pnpm add ember-cli-dependency-checker","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This is an Ember CLI addon and requires ember-cli to function. It specifies a peer dependency for compatibility.","package":"ember-cli","optional":false}],"imports":[{"note":"For application developers, direct programmatic import of the main addon object is uncommon. Ember CLI consumes this addon's `index.js` directly as a CommonJS module. While modern Ember applications might transpile ESM syntax, the addon itself exports CJS at its root.","wrong":"import addon from 'ember-cli-dependency-checker';","symbol":"Addon Definition Object","correct":"const addon = require('ember-cli-dependency-checker');"},{"note":"The core `Checker` class is available from an internal path. This is a CommonJS default export. While direct import of internal modules is generally discouraged due to potential breaking changes, modern Ember CLI tooling typically allows ESM import syntax for such files through transpilation.","wrong":"const Checker = require('ember-cli-dependency-checker/lib/checker');","symbol":"Checker","correct":"import Checker from 'ember-cli-dependency-checker/lib/checker';"},{"note":"Internal utility functions like `isGitRepo` are provided as named CommonJS exports from their respective `lib/utils` modules. Use named import syntax. Again, accessing internal paths is not part of the public API and should be done with caution.","wrong":"import isGitRepo from 'ember-cli-dependency-checker/lib/utils/git';","symbol":"isGitRepo","correct":"import { isGitRepo } from 'ember-cli-dependency-checker/lib/utils/git';"}],"quickstart":{"code":"npx ember install ember-cli-dependency-checker\n\n# After installation, the addon runs automatically before common Ember CLI commands.\n# For example, running:\n# npx ember serve\n# will trigger the dependency check. If dependencies are missing, it will display an error.\n\n# To demonstrate a missing dependency warning (DO NOT run in a production project):\n# 1. Add a non-existent package to package.json, e.g., '\"some-non-existent-package\": \"^1.0.0\"'\n# 2. Delete your node_modules directory.\n# 3. Run `npx ember s` to see the addon detect the missing dependency.","lang":"bash","description":"Illustrates how to add the `ember-cli-dependency-checker` addon to an Ember CLI project and explains its automatic operation."},"warnings":[{"fix":"Ensure `ember-cli-dependency-checker` is on a compatible version with your `ember-cli` installation, as specified in its `peerDependencies`.","message":"Major version upgrades of `ember-cli` itself can sometimes introduce breaking changes that require updates to `ember-cli-dependency-checker` or its configuration. Always consult the release notes for both `ember-cli` and this addon.","severity":"breaking","affected_versions":">=3.x"},{"fix":"Migrate any remaining Bower dependencies to npm or yarn packages. Remove `bower.json` and any related Bower tooling from your project.","message":"`bower` dependency checking is supported, but Bower itself is deprecated. While the addon will check for bower dependencies if `bower.json` exists, developers should migrate away from Bower entirely.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Always use a Node.js version officially supported by your current `ember-cli` version. Refer to the Ember CLI documentation for recommended Node.js versions.","message":"The `engines.node` requirement (`>= 6`) is quite old. While the addon might technically run on older Node versions, modern Ember CLI projects typically require much newer Node.js versions. Running on an outdated Node version can lead to other compatibility issues.","severity":"gotcha","affected_versions":"<=3.3.3"},{"fix":"Upgrade to `ember-cli-dependency-checker@3.4.0` or newer for improved pnpm support. Verify your monorepo setup is standard and consider checking the addon's source or issues for specific monorepo configurations if problems persist.","message":"When using monorepos with Yarn or pnpm workspaces, ensure the addon correctly identifies the workspace root and checks dependencies for the active project. While recent versions added pnpm support, complex monorepo setups can still lead to misconfigurations.","severity":"gotcha","affected_versions":"<3.4.0"}],"env_vars":null,"last_verified":"2026-04-23T00:00:00.000Z","next_check":"2026-07-22T00:00:00.000Z","problems":[{"fix":"Run `npm install`, `yarn install`, or `pnpm install` to install all listed dependencies. If the package is intentionally removed, ensure it's also removed from `package.json`.","cause":"The addon detected a package listed in your `package.json` (or `bower.json`) that is not installed in `node_modules` (or `bower_components`).","error":"Missing: [package-name] (expected in `devDependencies` or `dependencies`)"},{"fix":"Ensure the addon is listed in your `package.json` `devDependencies` and run `npm install` (or `yarn install`/`pnpm install`). If issues persist, try `npx ember uninstall ember-cli-dependency-checker` followed by `npx ember install ember-cli-dependency-checker`.","cause":"The addon was not correctly installed or its entry in `package.json` is corrupted, preventing `ember-cli` from loading it.","error":"Error: The `ember-cli-dependency-checker` addon could not be found or loaded."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}