npmwebpack95% confidence\u2191 242

Cannot find module 'webpack/bin/config-yargs'

Full error message
Getting error when running webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/. Here is the error log: 

module.js:442
throw err;
^

Error: Cannot find module 'webpack/bin/config-yargs'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)

If you're using webpack-cli 4 or webpack 5, change webpack-dev-server to webpack serve. Example: "serve": "webpack serve --config config/webpack.dev.js --progress" You might want also check this comment on GitHub: NPM package.json scripts are a convenient and useful means to run locally installed binaries without having to be concerned about their full paths. Simply define a script as such: For webpack-cli 3.x: "scripts": { "start:dev": "webpack-dev-server" } For webpack-cli 4.x: "scripts": { "start:dev": "webpack serve" }

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/9a1a636c27632eff3e9fc6d759d1f96936f9e95787d8e0b325853a2f4a0a6c87
hash \u00b7 9a1a636c27632eff3e9fc6d759d1f96936f9e95787d8e0b325853a2f4a0a6c87
Cannot find module 'webpack/bin/config-yargs' — DepScope fix | DepScope