Reputation: 1303
I want to write a simple demo by using webpack and babel, but I really cant figure out what problem is, I have webpack version 1.13.3 and after i try to install npm install --save-dev babel-core babel-preset-es2015
or npm install --save-dev babel-loader
I get the following errors:
+-- [email protected]
+-- [email protected]
`-- UNMET PEER DEPENDENCY webpack@1 || ^2.1.0-beta
or
+-- [email protected]
`-- UNMET PEER DEPENDENCY webpack@1 || ^2.1.0-beta
I have node v.6.9.1 and npm v4.0.2 what should I do?
Upvotes: 1
Views: 102
Reputation: 22189
Since the latest peer dependencies of the webpack
are installed through the devdependencies
as mentioned here
Therefore if you try to install the webpack without installing the webpack-dev-server
it will throw an error.
Same issue is referenced here
So using the following npm command npm install --global webpack webpack-dev-server
eliminates the warning about the webpack as well as installing it globally.
Locally the command works fine
npm install --save-dev webpack
npm install --save-dev webpack-dev-server
Upvotes: 1