s-a / iron-node

Debug Node.js code with Chrome Developer Tools.

Home Page:http://s-a.github.io/iron-node/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mocha support broken?

arv opened this issue · comments

Running iron-node node_modules/.bin/_mocha fails with the given errors in the dev tools console

ironNode boot
app.js:195 os darwin Darwin
app.js:196 versions Object {http_parser: "2.7.0", node: "6.1.0", v8: "5.0.71.39", uv: "1.9.0", zlib: "1.2.8"…}ares: "1.10.1-DEV"atom-shell: "1.1.0"chrome: "50.0.2661.102"electron: "1.1.0"http_parser: "2.7.0"modules: "48"node: "6.1.0"openssl: "1.0.2h"uv: "1.9.0"v8: "5.0.71.39"zlib: "1.2.8"__proto__: Object
app.js:197
appData /Users/arv/.npm-packages/lib/node_modules/iron-node/node_modules
app.js:201
configuration Object {filename: null, settings: Object}filename: nullsettings: Object__proto__: Object
app.js:207
ironNode packages
/Users/arv/.npm-packages/lib/node_modules/iron-node/node_modules/package.js/lib/index.js:61
scanning ["/Users/arv/.npm-packages/lib/node_modules/iron-node/node_modules"]
/Users/arv/.npm-packages/lib/node_modules/iron-node/app/require-custom-wrap.js:32
Object {v8: Object, app: Object}
app.js:58   Error: Cannot find module '../'

  - module.js:20 require
    internal/module.js:20:19

  - _mocha:12 Object.<anonymous>
    [js]/[.bin]/_mocha:12:11

error @ app.js:58
emitOne @ events.js:96
emit @ events.js:188
window.onerror @ /Users/arv/.npm-packages/lib/node_modules/iron-node/node_modules/electron-p…lt/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js:103
app.js:59 Details Error: Cannot find module '../'(…)
error @ app.js:59
emitOne @ events.js:96
emit @ events.js:188
window.onerror @ /Users/arv/.npm-packages/lib/node_modules/iron-node/node_modules/electron-p…lt/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js:103

Some more version infos:

$ npm info -g iron-node version
3.0.4
$ npm info mocha version
2.4.5

This used to work in iron-node 2.x

Can you try 2 things?

electron 1.0.2: https://github.com/s-a/iron-node/blob/master/docs/CHANGE-ELECTRON-VERSION.md.

The only code change which could cause this is here.

extendProcessEnvironment();

You can simply comment it out.

One more interesting point is. Does your mocha Test run with Node 6? electron upgraded Node Version in the last release.

Thanks.

Yes. The tests work in Node 6.0, 6.1 and 6.2

I'm still struggling to figure out how to try iron-node with Electron 1.0.2. The instructions did not work for me (OSX).

You need to find your global Installation folder of Node modules. ironNode is installed there.

Do you use the latest mocha Version?

2.4.5 is the latest version of mocha.

Yeah, I did try this in the global installation for iron-node.

Just tried ...
for me it works as expected

image