I used:
npm install -g webpack
npm install -g webpack-dev-server
I keep getting:
├── UNMET PEER DEPENDENCY webpack@>=1.3.0 <3
└─┬ [email protected]
└── UNMET PEER DEPENDENCY webpack@1 || ^2.1.0-beta
I then tried:
npm install [email protected] -g
Trying npm install webpack-dev-server still yields the same error. What gives?
Introduction. Webpack is a bundler for modules. The main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. Bundles ES Modules, CommonJS, and AMD modules (even combined).
Usage: webpack serve|server|s [entries...] [options] Run the webpack dev server. Options: -c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name <value...>
And if I want to use react-hot-loader, is the webpack-dev-server necessary? Nope, it works on top of Webpack's hot module replacement interface. You can create your own 'hot server' if you want.
npm install --save-dev webpack
npm install --save-dev webpack-dev-server
Try these commands... it worked for me...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With