Skip to content

Running JS on Windows #185

Closed
Closed
@richardschneider

Description

@richardschneider

A few of our tests (see block.js) run JS code like this

const df = DaemonFactory.create({ exec: 'src/cli/bin.js' })

On Windows it fails with

>aegir test -f test\http-api\interface\block.js
Test Node.js


  .block
    1) "before all" hook


  0 passing (766ms)
  1 failing

  1) .block
       "before all" hook:
     Uncaught expected [Error: internal/child_process.js:340
    throw errnoException(err, 'spawn');
    ^

Error: spawn UNKNOWN
    at _errnoException (util.js:1031:13)
    at ChildProcess.spawn (internal/child_process.js:340:11)
    at exports.spawn (child_process.js:499:9)
    at module.exports (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\comandante\index.js:11:14)
    at Object.<anonymous> (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\subcomandante\subcom:23:13)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
] to not exist
  AssertionError: expected [Error: internal/child_process.js:340
      throw errnoException(err, 'spawn');
      ^

  Error: spawn UNKNOWN
      at _errnoException (util.js:1031:13)
      at ChildProcess.spawn (internal/child_process.js:340:11)
      at exports.spawn (child_process.js:499:9)
      at module.exports (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\comandante\index.js:11:14)
      at Object.<anonymous> (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\subcomandante\subcom:23:13)
  ] to not exist
      at factory.spawnNode (node_modules\interface-ipfs-core\src\block.js:32:30)
      at df.spawn (test\http-api\interface\block.js:17:20)
      at waterfall (node_modules\ipfsd-ctl\src\daemon-ctrl.js:132:16)
      at node_modules\async\internal\once.js:12:16
      at next (node_modules\async\waterfall.js:21:29)
      at node_modules\async\internal\onlyOnce.js:12:16
      at run (node_modules\ipfsd-ctl\src\daemon-node.js:128:16)
      at f (node_modules\once\once.js:25:25)
      at Object.done (node_modules\ipfsd-ctl\src\exec.js:23:18)
      at Stream.listeners.done.once (node_modules\ipfsd-ctl\src\exec.js:45:18)
      at Stream.f (node_modules\once\once.js:25:25)
      at Socket.reemit (node_modules\duplexer\index.js:70:25)
      at Pipe._handle.close [as _onclose] (net.js:558:12)

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