Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR! peer dep missing: webpack@^2.2.0, required by webpack-dev-server@2.5.0 #5218

Closed
Download opened this issue Jul 5, 2017 · 3 comments

Comments

@Download
Copy link

Download commented Jul 5, 2017

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Upgrade to Webpack 3 fails on missing peer dependency

If the current behavior is a bug, please provide the steps to reproduce.
Take any project that is using both webpack and webpack-dev-server, then:

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

Observe: NPM install fails with error message:

npm ERR! peer dep missing: webpack@^2.2.0, required by webpack-dev-server@2.5.0

For an example, have a look at my project ulog. It has Greenkeeper enabled but it's attempts to upgrade webpack are failing with this message:

npm ERR! peerinvalid The package webpack@3.0.0 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer webpack-dev-server@2.4.5 wants webpack@^2.2.0

What is the expected behavior?
For webpack-dev-server to also have a v3 version published to NPM with a correct peer dependency on webpack v3.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
There is also an issue open on the webpack-dev-server repo:
Not compatible with webpack 3.0 ?? #961

It seems the peer dependency was actually already fixed, but somehow never published to NPM.

Builds all over the web are failing because of this. Really such a big release should get simultaneous releases of all major components so these problems don't occur, but this issue is already open for 9 days. Which is why I ask here in the hope this gets the attention it deserves. Because it looks like fixing it is just a single npm publish away...

BTW: I think a lesson to learn here for future releases is that first major components like webpack-dev-server (but ideally,also tools from third parties) should get some time to get tested and release and publish to NPM a new version that has a wider peer dependency range that includes the new upcoming Webpack version, and only then should webpack itself be released.

Because NPM will pick the latest version of webpack and webpack-dev-server, any new projects trying to install both (e.g. starter kits etc) run a big risk of ending up with a broken build.

WORKAROUND: Downgrade to Webpack 2 until this is resolved by specifying the version explicitly:

npm install --save-dev webpack@2 webpack-dev-server
@sokra
Copy link
Member

sokra commented Jul 6, 2017

@webpack-bot move to webpack/webpack-dev-server

@webpack-bot
Copy link
Contributor

I've moved it to webpack/webpack-dev-server.

@Download
Copy link
Author

Download commented Jul 6, 2017

@sokra There is one there already...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants