Skip to content

write EINVAL "Unhandled 'error' event" on Windows 10 with Node 7.1.0 #2577

@DeividasK

Description

@DeividasK

Hello all,

New to mocha here. I have npm install mocha --save-dev. I have a folder named test with an empty file messages.js. If I run mocha, I get the following error:

Mocha 3.1.2

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

Error: write EINVAL
    at exports._errnoException (util.js:1022:11)
    at WriteStream.Socket._writeGeneric (net.js:715:26)
    at WriteStream.Socket._write (net.js:734:8)
    at doWrite (_stream_writable.js:334:12)
    at writeOrBuffer (_stream_writable.js:320:5)
    at WriteStream.Writable.write (_stream_writable.js:247:11)
    at WriteStream.Socket.write (net.js:661:40)
    at c:\leoboto\node_modules\mocha\bin\_mocha:483:12
    at Array.forEach (native)
    at exit (c:\leoboto\node_modules\mocha\bin\_mocha:480:11)
    at done (c:\leoboto\node_modules\mocha\lib\mocha.js:517:13)
    at Runner.<anonymous> (c:\leoboto\node_modules\mocha\lib\runner.js:826:5)
    at emitNone (events.js:91:20)
    at Runner.emit (events.js:185:7)
    at c:\leoboto\node_modules\mocha\lib\runner.js:813:12
    at Runner.runSuite (c:\leoboto\node_modules\mocha\lib\runner.js:606:12)
    at start (c:\leoboto\node_modules\mocha\lib\runner.js:811:10)
    at Runner.run (c:\leoboto\node_modules\mocha\lib\runner.js:838:5)
    at Mocha.run (c:\leoboto\node_modules\mocha\lib\mocha.js:521:17)
    at Object.<anonymous> (c:\leoboto\node_modules\mocha\bin\_mocha:458:18)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.runMain (module.js:607:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3
npm ERR! Test failed.  See above for more details.

Mocha 2.5.3

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

Error: write EINVAL
    at exports._errnoException (util.js:1022:11)
    at WriteStream.Socket._writeGeneric (net.js:715:26)
    at WriteStream.Socket._write (net.js:734:8)
    at doWrite (_stream_writable.js:334:12)
    at writeOrBuffer (_stream_writable.js:320:5)
    at WriteStream.Writable.write (_stream_writable.js:247:11)
    at WriteStream.Socket.write (net.js:661:40)
    at c:\leoboto\node_modules\mocha\bin\_mocha:426:12
    at Array.forEach (native)
    at exit (c:\leoboto\node_modules\mocha\bin\_mocha:423:11)
    at done (c:\leoboto\node_modules\mocha\lib\mocha.js:498:13)
    at Runner.<anonymous> (c:\leoboto\node_modules\mocha\lib\runner.js:799:5)
    at emitNone (events.js:91:20)
    at Runner.emit (events.js:185:7)
    at c:\leoboto\node_modules\mocha\lib\runner.js:786:12
    at Runner.runSuite (c:\leoboto\node_modules\mocha\lib\runner.js:584:12)
    at start (c:\leoboto\node_modules\mocha\lib\runner.js:784:10)
    at Runner.run (c:\leoboto\node_modules\mocha\lib\runner.js:811:5)
    at Mocha.run (c:\leoboto\node_modules\mocha\lib\mocha.js:502:17)
    at Object.<anonymous> (c:\leoboto\node_modules\mocha\bin\_mocha:404:18)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.runMain (module.js:607:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3
npm ERR! Test failed.  See above for more details.

Windows 10
Node v7.1.0

Any ideas what could be causing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions