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

TypeError: flatten.depth is not a function #989

Closed
limi58 opened this issue Jul 12, 2017 · 4 comments
Closed

TypeError: flatten.depth is not a function #989

limi58 opened this issue Jul 12, 2017 · 4 comments

Comments

@limi58
Copy link

limi58 commented Jul 12, 2017

run webpack-dev-server is ok, but a few minutes later error happen:

D:\web\imbgf\node_modules\bonjour\lib\mdns-server.js:54
      ? flatten.depth(Object.keys(self.registry).map(self._recordsFor.bind(self,
 name)), 1)
                ^

TypeError: flatten.depth is not a function
    at D:\web\imbgf\node_modules\bonjour\lib\mdns-server.js:54:17
    at Array.forEach (native)
    at Server._respondToQuery (D:\web\imbgf\node_modules\bonjour\lib\mdns-server
.js:48:19)
    at emitTwo (events.js:125:13)
    at EventEmitter.emit (events.js:213:7)
    at Socket.<anonymous> (D:\web\imbgf\node_modules\multicast-dns\index.js:45:4
0)
    at emitTwo (events.js:125:13)
    at Socket.emit (events.js:213:7)
    at UDP.onMessage [as onmessage] (dgram.js:623:8)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! imbgf@0.5.1 dev: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the imbgf@0.5.1 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

windows10
webpack v3.2.0
webpack-dev-server v2.5.1
node 8.0.0
npm 5.1.0

v2.4.5 works fine

@Fnll
Copy link

Fnll commented Jul 13, 2017

have same issue for mac

/usr/local/lib/node_modules/webpack-dev-server/node_modules/bonjour/lib/mdns-server.js:54
      ? flatten.depth(Object.keys(self.registry).map(self._recordsFor.bind(self, name)), 1)
                ^

TypeError: flatten.depth is not a function
    at /usr/local/lib/node_modules/webpack-dev-server/node_modules/bonjour/lib/mdns-server.js:54:17
    at Array.forEach (native)
    at Server._respondToQuery (/usr/local/lib/node_modules/webpack-dev-server/node_modules/bonjour/lib/mdns-server.js:48:19)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:194:7)
    at Socket.<anonymous> (/usr/local/lib/node_modules/webpack-dev-server/node_modules/multicast-dns/index.js:45:40)
    at emitTwo (events.js:106:13)
    at Socket.emit (events.js:194:7)
    at UDP.onMessage [as onmessage] (dgram.js:544:8)

node 7.1.0
npm 5.2.0
webpack-dev-server 2.5.1
webpack 2.6.1

@r4fx
Copy link

r4fx commented Jul 24, 2017

check 2.6.0 release, it's fixed for me #958

@hedrick
Copy link

hedrick commented Jul 31, 2017

Having this issue when using the bonjour npm package on an express app - kind of odd since webpack isn't included in the node_modules, package.json or the package-lock.json.

I know the npm bonjour package is included in webpack-dev-server but I'm not using this module.

@shellscape
Copy link
Contributor

@hedrick please check the latest release. I believe we have this resolved. If it's still causing an issue for you, it might be worth following up with the bonjour team as I believe we're doing everything we can on our end.

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

5 participants