{"id":20880,"library":"yarn-check-webpack-plugin","title":"yarn-check-webpack-plugin","description":"A webpack plugin that verifies there are no missing or outdated yarn dependencies during development. The plugin runs `yarn check --integtrity` as a webpack compilation hook and displays warnings for missing or wrong version packages. It is designed for large codebases where dependencies change frequently across branches. The current stable version is 1.2.0, but the package appears in maintenance mode (last release in 2019). It is type-safe with TypeScript types included. Exclusive in its integration of yarn's dependency checking directly into the webpack build lifecycle, differentiating it from lint-based or separate CLI approaches.","status":"maintenance","version":"1.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/skovy/yarn-check-webpack-plugin","tags":["javascript","webpack","yarn check","yarn verify tree","typescript"],"install":[{"cmd":"npm install yarn-check-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add yarn-check-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add yarn-check-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":null,"imports":[{"note":"Named export (not default) in both ESM and CommonJS.","wrong":"import YarnCheck from 'yarn-check-webpack-plugin'","symbol":"YarnCheck","correct":"import { YarnCheck } from 'yarn-check-webpack-plugin'"},{"note":"CommonJS require also supported.","wrong":null,"symbol":"YarnCheck","correct":"const { YarnCheck } = require('yarn-check-webpack-plugin')"},{"note":"Type import available.","wrong":null,"symbol":"YarnCheckOptions","correct":"import { YarnCheckOptions } from 'yarn-check-webpack-plugin'"}],"quickstart":{"code":"// webpack.config.js\nconst { YarnCheck } = require('yarn-check-webpack-plugin');\n\nmodule.exports = {\n  // ... other config\n  plugins: [\n    new YarnCheck({\n      rootDirectory: __dirname,\n      exclude: /some-package/\n    })\n  ]\n};","lang":"javascript","description":"Basic setup showing CommonJS require, plugin instantiation with optional config (rootDirectory and exclude), and conditional 'forceKill' option."},"warnings":[{"fix":"Use yarn-plugin or upgrade to a tool like 'check-dependencies', or stay on Yarn Classic.","message":"yarn check --integtrity has been removed in Yarn 2+ (Berry). The plugin will not work with Yarn >=2.","severity":"deprecated","affected_versions":">=2.0.0-yarn"},{"fix":"Add 'forceKill' property if needed, otherwise it's optional.","message":"In version 1.2.0, the 'forceKill' option was added. If you used an earlier version, your config object might be missing this property – safe to ignore.","severity":"breaking","affected_versions":"<1.2.0"},{"fix":"Use the appropriate plugin for your package manager (e.g., npm-check-webpack-plugin).","message":"The plugin only runs when yarn.lock is present; if using npm or pnpm, it will silently no-op.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider using a watch mode filter or only run in development.","message":"The plugin runs a spawn of 'yarn check' on every compilation. This can add overhead in large projects.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"yarn add -D yarn-check-webpack-plugin","cause":"Package not installed.","error":"Cannot find module 'yarn-check-webpack-plugin'"},{"fix":"Use { YarnCheck } from 'yarn-check-webpack-plugin'","cause":"Default import used instead of named import.","error":"TypeError: YarnCheck is not a constructor"},{"fix":"Run 'yarn install --check-files' to restore missing packages.","cause":"A package is missing from node_modules.","error":"Missing packages: \\n  - lodash\\nPlease run `yarn install --check-files` to update."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}