{"id":20725,"library":"webpack-command","title":"webpack-command","description":"webpack-command (v0.5.1) is a lightweight, modular CLI for webpack 4 that provides an enhanced user experience over webpack-cli. It features extendable configurations, custom reporters, support for configs in JSON/YAML/JS, and did-you-mean flag suggestions. Requires Node >=8.9.0 and webpack ^4.4.0. The package is in maintenance mode; the recommended successor is webpack-nano. Key differentiator: significantly smaller package size (24% of webpack-cli) and richer default output via webpack-stylish. Release cadence: irregular, last release 0.5.1.","status":"maintenance","version":"0.5.1","language":"javascript","source_language":"en","source_url":"https://github.com/shellscape/webpack-command","tags":["javascript","webpack"],"install":[{"cmd":"npm install webpack-command","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-command","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-command","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: webpack-command requires webpack ^4.4.0","package":"webpack","optional":false}],"imports":[{"note":"The primary binary is `wp` to avoid conflict with webpack-cli. The `webpack` binary may also be used if no other webpack CLI is installed.","wrong":"webpack --help","symbol":"webpack-command (CLI)","correct":"wp --help"},{"note":"webpack-command is primarily a CLI tool; its programmatic API is not well documented and may not be stable. CommonJS require is used.","wrong":"import webpackCmd from 'webpack-command';","symbol":"Programmatic API (not officially exported)","correct":"const webpackCmd = require('webpack-command');"},{"note":"No official export for reporter interface. See documentation for creating custom reporters via configuration.","wrong":"","symbol":"Custom reporter","correct":"// Implement your own reporter by passing --reporter option"}],"quickstart":{"code":"npm install webpack-command webpack --save-dev\n# basic usage: wp ./src/index.js --output ./dist/bundle.js","lang":"javascript","description":"Install webpack-command and webpack as dev dependencies, then run the CLI with entry and output files."},"warnings":[{"fix":"Upgrade Node to >=8.9.0.","message":"Node v8 minimum: version 0.5.0 dropped support for Node v6.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Migrate to webpack-nano (https://www.npmjs.com/package/webpack-nano).","message":"webpack-command is in maintenance mode. The recommended alternative is webpack-nano.","severity":"deprecated","affected_versions":"*"},{"fix":"Uninstall webpack-cli before installing webpack-command: npm uninstall webpack-cli.","message":"Cannot be installed alongside webpack-cli because both export a 'webpack' binary.","severity":"gotcha","affected_versions":"*"},{"fix":"Use webpack 4.x or switch to a webpack 5-compatible CLI like webpack-cli.","message":"Requires webpack ^4.4.0; not compatible with webpack 5.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install webpack --save-dev` and use npx or local node_modules.","cause":"webpack is not installed or is a devDependency not available globally.","error":"Error: Cannot find module 'webpack'"},{"fix":"Run `npm uninstall webpack-cli` and then install webpack-command.","cause":"Both packages export a 'webpack' binary, causing conflicts.","error":"Error: webpack-command cannot be installed together with webpack-cli."},{"fix":"Set mode in webpack config (module.exports.mode) or use environment variable NODE_ENV.","cause":"The --mode flag is not supported by webpack-command; use --define-process-env-node-env or configuration file.","error":"Error: Unknown argument: --mode"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}