Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install webpack-dev-server? Getting unmet dependencies

Tags:

npm

webpack

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?

like image 556
Rolando Avatar asked Oct 08 '16 00:10

Rolando


People also ask

What does npm install webpack do?

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).

What is the command for installing webpack development server?

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...>

Do you need Webpack dev server?

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.


1 Answers

npm install --save-dev webpack
npm install --save-dev webpack-dev-server

Try these commands... it worked for me...

like image 58
Moulesh Avatar answered Jan 04 '23 10:01

Moulesh