Webpack-dev-server: Error: addMembership ENODEV - Using It Without Network Connection with Loopback Interface At localhost/127.0.0.1

Created on 9 Jul 2017  Â·  13Comments  Â·  Source: webpack/webpack-dev-server

Do you want to request a feature or report a bug?
BUG Maybe

What is the current behavior?

Error With Trace
Error: addMembership ENODEV at exports._errnoException (util.js:1018:11) at Socket.addMembership (dgram.js:506:11) at Socket.<anonymous> (/home/idnes/BlaBlaBla/node_modules/multicast-dns/index.js:53:16) at emitNone (events.js:91:20) at Socket.emit (events.js:185:7) at startListening (dgram.js:121:10) at _handle.lookup (dgram.js:226:7) at _combinedTickCallback (internal/process/next_tick.js:83:11) at process._tickCallback (internal/process/next_tick.js:104:9) at Module.runMain (module.js:606:11) at run (bootstrap_node.js:389:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:504:3

If the current behavior is a bug, please provide the steps to reproduce.
Fresh Install - Simple Configuration

CASE A : NOT WORK

  • node 6.11.0
  • npm 5.1.0
  • webpack 3.1.0
  • webpack-dev-server 2.5.0 and 2.5.1
  • using loopback interface at localhost / 127.0.0.1
  • NO NETWORK CONNECTED !!

CASE B: WORK

  • node 6.11.0
  • npm 5.1.0
  • webpack 3.1.0
  • webpack-dev-server 2.5.0 and 2.5.1
  • using loopback interface at localhost / 127.0.0.1
  • WITH NETWORK CONNECTED !!

CASE C: WORK

  • node 6.11.0
  • npm 5.1.0
  • webpack 3.1.0
  • webpack-dev-server 2.4.5
  • using loopback interface at localhost / 127.0.0.1
  • NO NETWORK CONNECTED !!

What is the expected behavior?
No Error

If this is a feature request, what is motivation or use case for changing the behavior?

  • Sometimes i work without network connection at all
  • It work before 2.5.0

Please mention your webpack and Operating System version.
ubuntu 16.04

Most helpful comment

npm upgrade webpack-dev-server fixed the issue for me.

Its fixed in 2.6.1

All 13 comments

Is that the full stack trace?

@Plazmaz i updated my issues ..

Same for me. I was trying to work offline and got the same error as @idnesdotlink. When I open my hotspot everything works again. Seems that webpack-dev-server requires to be online to work.

Workaround: Go online, start webpack-dev-server, go offline. It builds and refreshes just fine. Restarting the server however results in the error again

  • when starting the webpack-dev-server when wifi on :
> webpack-dev-server --env.dev
Project is running at http://localhost:8080/
  • when wifi is off:
> webpack-dev-server --env.dev

events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: addMembership ENODEV
    at exports._errnoException (util.js:1016:11)
    at Socket.addMembership (dgram.js:579:11)
    at Socket.<anonymous> (/home/home/my/react/outliner/node_modules/multicast-dns/index.js:53:16)
    at emitNone (events.js:110:20)
    at Socket.emit (events.js:207:7)
    at startListening (dgram.js:144:10)
    at _handle.lookup (dgram.js:249:7)
    at _combinedTickCallback (internal/process/next_tick.js:105:11)
    at process._tickCallback (internal/process/next_tick.js:161:9)
    at Function.Module.runMain (module.js:607:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `webpack-dev-server --env.dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Same for me node 6.11.0, webpack-dev-server 2.5.1 webpack 2.6.1

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: addMembership ENODEV
    at exports._errnoException (util.js:1018:11)
    at Socket.addMembership (dgram.js:506:11)
    at Socket.<anonymous> (node_modules/multicast-dns/index.js:53:16)
    at emitNone (events.js:91:20)
    at Socket.emit (events.js:185:7)
    at startListening (dgram.js:121:10)
    at _handle.lookup (dgram.js:226:7)
    at _combinedTickCallback (internal/process/next_tick.js:83:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3

npm ERR! Linux 4.8.0-58-generic
...

Have you tried building from source? There was a similar looking issue fixed in #958

@Plazmaz I tested webpack’s master and #958 fixes this problem.

What blocks releasing #958?

I don't know @ai, I tried PRing a version bump, but they refused to accept it from someone without collaborator access.

@Plazmaz oops, I thought you were from core team :D.

@TheLarkInn What blocks releasing #958? Because of this issue, it is hard to write code in the most productive time — during airplane flight :D.

npm upgrade webpack-dev-server fixed the issue for me.

Its fixed in 2.6.1

closing it with 2.6.1 update

This is still broken for me, when I try to start webpack-dev-server with wifi off :

"webpack": "^3.4.1",
"webpack-dev-server": "^2.6.1"
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: addMembership ENODEV
    at exports._errnoException (util.js:1016:11)
    at Socket.addMembership (dgram.js:579:11)
    at Socket.<anonymous> (/.../node_modules/multicast-dns/index.js:53:16)
    at emitNone (events.js:110:20)
    at Socket.emit (events.js:207:7)
    at startListening (dgram.js:144:10)
    at _handle.lookup (dgram.js:249:7)
    at _combinedTickCallback (internal/process/next_tick.js:105:11)
    at process._tickCallback (internal/process/next_tick.js:161:9)
    at Function.Module.runMain (module.js:607:11)

I'm using we pack up inside my nodejs project but it is not working, and I'm getting error but from internal libraries In connection with WebSocket handshake, is there any relationship between them?? How to resolve??

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StephanBijzitter picture StephanBijzitter  Â·  3Comments

gimmi picture gimmi  Â·  3Comments

Jack-Works picture Jack-Works  Â·  3Comments

uMaxmaxmaximus picture uMaxmaxmaximus  Â·  3Comments

da2018 picture da2018  Â·  3Comments