I think this
https://github.com/webpack/webpack-dev-server/blob/master/package.json#L41
should be in dependencies not devDependencies. It's causing the module not found error, after I do webpack-dev-server
I installed with npm install --save-dev https://github.com/webpack/webpack-dev-server.git
I needed to do this rather than npm install --save-dev webpack-dev-server because I'm trying to get around that Error: addMembership EHOSTUNREACH issue.
I'm using Windows 10 64bit
and here's a piece of my package.json file
"webpack": "^3.0.0",
"webpack-dev-server": "git+https://github.com/webpack/webpack-dev-server.git"
please let me know if I'm doing something wrong.
I believe this is a bug.
I think this is caused since the loglevel package being used in client/index.js but is listed under devDependencies in the package.json instead of dependencies and hence is not installed
I resolved it by simply running
npm i loglevel
Edit: (just realised this was mentioned in the issue, my bad)
Strange, but after having same error i install loglevel under devDependencies and this also solved the problem...
I was having similar error Module not found: Error: Can't resolve 'loglevel' with webpack-dev-server and also solved it by npm -D loglevel
Now with the recent version of webpack-dev-server you must also install loglevel
If you have already globally installed webpack-dev-server. Use command npm install -g loglevel
if you have already locally installed webpack-dev-server. Use command npm install --save-dev loglevel
But why? Is this a bug or...?
@markelog I personally 99% sure it's a bug and loglevel should be moved from devDependencies to dependencies. Pull request with solution is already submitted by @athomann (#1001)
Meanwhile we need to manually install loglevel ok ?
@DavidNorena, I don't see any critical innovations in [email protected] improving developer experience, so if you don't need any of these updates, you can fallback to previous version until the bug is fixed or as you said it above, you can manually install loglevel mentioned in @sayanriju comment or if you are using yarn - yarn add -D loglevel
@zalishchuk Thank you so much man !
What fallback version doesn't have this bug? I have WDS v2.4.2 in devDependencies and am seeing this.
Fixed in [email protected].
Thanks for the responses. And I will try that version. Sorry I didn't see these responses until today.
Are you sure that it's fixed? I'm still getting the same error with v2.6.1. Goes away when I install loglevel. Tried rm -rf node_modules && npm i. Is loglevel supposed to be a peerDependency or is this just a bug?
@rojobuffalo loglevel package is currently in dependencies section, are you sure you are using 2.6.1 version?
@zalishchuk I cleaned everything out and re-installed a second and then a third time. After the third try it's all working. Weird, but seems like you can disregard my comment.
npm install -D loglevel resolved for me. Thanks!
Still happening in 3.10.1. Might be happening because I installed webpack-dev-server in a parent directory due to a mono repository architecture.
Still happening in
3.10.1. Might be happening because I installedwebpack-dev-serverin a parent directory due to a mono repository architecture.
it happens with me if I specify webpack.config.js file location for webpack-dev-server!!

Most helpful comment
I think this is caused since the
loglevelpackage being used inclient/index.jsbut is listed underdevDependenciesin thepackage.jsoninstead ofdependenciesand hence is not installedI resolved it by simply running
Edit: (just realised this was mentioned in the issue, my bad)