Closed
Description
- Operating System: Mac OS 10.13.4
- Node Version: v8.11.1
- NPM Version: 6.1.0
- webpack Version: 4.12.0
- webpack-dev-server Version: 3.1.4
- This is a bug
- This is a modification request
Code
N/A
Expected Behavior
That webpack-dev-server
works with webpack-command
.
Or if it specifically needs webpack-cli
it's made an explicit dependency.
Actual Behavior
webpack-dev-server
crashes as it's trying to directly access webpack-cli/bin/config-yargs
.
> webpack-dev-server --mode development --hot
The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D
module.js:549
throw err;
^
Error: Cannot find module 'webpack-cli/bin/config-yargs'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/xxx/node_modules/webpack-dev-server/bin/webpack-dev-server.js:65:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
For Bugs; How can we reproduce the behavior?
Create a project with webpack-command
and without webpack-cli