{"id":171,"hash":"9a1a636c27632eff3e9fc6d759d1f96936f9e95787d8e0b325853a2f4a0a6c87","pattern":"Cannot find module &#39;webpack/bin/config-yargs&#39;","full_message":"Getting error when running webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/. Here is the error log: \n\nmodule.js:442\nthrow err;\n^\n\nError: Cannot find module 'webpack/bin/config-yargs'\nat Function.Module._resolveFilename (module.js:440:15)\nat Function.Module._load (module.js:388:25)\nat Module.require (module.js:468:17)\nat require (internal/module.js:20:19)\nat Module._compile (module.js:541:32)\nat Object.Module._extensions..js (module.js:550:10)\nat Module.load (module.js:458:32)\nat tryModuleLoad (module.js:417:12)\nat Function.Module._load (module.js:409:3)","ecosystem":"npm","package_name":"webpack","package_version":null,"solution":"If you're using webpack-cli 4 or webpack 5, change webpack-dev-server to webpack serve.\n\nExample:\n\n\"serve\": \"webpack serve --config config/webpack.dev.js --progress\"\n\nYou might want also check this comment on GitHub:\n\nNPM package.json scripts are a convenient and useful means to run\nlocally installed binaries without having to be concerned about their\nfull paths. Simply define a script as such:\n\nFor webpack-cli 3.x:\n\n\"scripts\": {   \"start:dev\": \"webpack-dev-server\" }\n\nFor webpack-cli 4.x:\n\n\"scripts\": {   \"start:dev\": \"webpack serve\" }","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/40379139/cannot-find-module-webpack-bin-config-yargs","votes":242,"created_at":"2026-04-19T04:41:26.286036+00:00","updated_at":"2026-04-19T04:51:08.340513+00:00"}