Skip to content

bindings issue #7

@funguru

Description

@funguru

Hello,

I faced some issues, actually node compiles correctly, but at the run time: it returns me :
if (debugging ) return process.binding(name.replace(/.node$/,''));
^
Error: No such module: my_addon
at Error (native)
at resolveBinding (NAD/my-addon/node_modules/nad-bindings/index.js:20:34)
at Object. (NAD/my-addon/my-addon.js:3:38)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

by commenting the line:
if (debugging ) return process.binding(name.replace(/.node$/,''));

I have two different behaviors:
From terminal : $TheCompiledNode my_addon.js
node version v0.12.2

JS: Hi from JS my_addon
C++: my_addon says hello

From Xcode:
/NAD/my-addon/node_modules/bindings/bindings.js:159
throw new Error('Could not find module root given file: "' + file
^
Error: Could not find module root given file: "[object Object]". Do you have a package.json file?
at Function.getRoot (/NAD/my-addon/node_modules/bindings/bindings.js:159:13)
at resolveBinding (/NAD/my-addon/node_modules/nad-bindings/index.js:21:59)
at Object. (/NAD/my-addon/my-addon.js:3:38)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

May be I missed to configure nad correctely, if you could help.

Many thanks in advance,

PS: I am using the nad.0.1.0 / node :v0.12.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions