Are you getting Error: Cannot find module 'webpack-cli/bin/config-yargs'
? Have you recently upgraded Webpack? To clear the above message trying changing from "start": "webpack-dev-server --mode development --progress --color",
to "start": "webpack serve --mode development --progress --color",
in package.json.
yarn run v1.22.5
$ webpack-dev-server --mode development --progress --color
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
warning Skipping preferred cache folder "/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-501".
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
internal/modules/cjs/loader.js:896
throw err;
^
Error: Cannot find module 'webpack-cli/bin/config-yargs'
Require stack:
- /../../client/node_modules/webpack-dev-server/bin/webpack-dev-server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:893:15)
at Function.Module._load (internal/modules/cjs/loader.js:743:27)
at Module.require (internal/modules/cjs/loader.js:965:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/../../client/node_modules/webpack-dev-server/bin/webpack-dev-server.js:65:1)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/../../client/node_modules/webpack-dev-server/bin/webpack-dev-server.js'
]
}
error Command failed with exit code 1.
Top comments (0)