Maidsafe Node modules

When I am installing
NODE_ENV=dev npm install @maidsafe/safe-node-app --save
This error is shown always
gyp: Call to 'node -e "require('nan')"' returned exit status -6 while in binding.gyp. while trying to load binding.gyp
I have gone through many google solution but failed atlast.
Any help is appreciated…Thank you.

1 Like

What node version are you running @avirup?

From the readme:

Node.js ^8.0.0 (we recommend installing it via nvm)

1 Like

@joshuef
I am using
node v10.15.3

1 Like

Hmmmm. And which platform?

That’s odd you’re seeing that. This is with the latest published version of safe_app_nodejs now?

The error is indeed about incompatibility, most likely in the node-ffi package, but that’s been updated to avoid this in the latest versions…

Let me know your full platform / versions and I’ll see if i can replicate this.

Infact, if you have a link to the project that I can try building that may also be useful, as it could be some other package conflicting for eg.

1 Like

@joshuef
Thanks for your time.
I am using fedora29
I have just clone this repo

then just install

NODE_ENV=dev npm install @maidsafe/safe-node-app --save

Nothing else…
this error is shown

> ref@1.3.5 install /home/Avirup/Desktop/Avirup/simple_electron_project/node_modules/ref
> node-gyp rebuild

gyp: Call to 'node -e "require('nan')"' returned exit status -6 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.0.9-200.fc29.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/Avirup/Desktop/Avirup/simple_electron_project/node_modules/ref
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp: line 6: 10525 Aborted                 (core dumped) "$npm_config_node_gyp" "$@"
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! ref@1.3.5 install: `node-gyp rebuild`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the ref@1.3.5 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/Avirup/.npm/_logs/2019-05-03T08_49_13_704Z-debug.log
Aborted (core dumped)
2 Likes

Yes, I’ve been trying to solve this issue, so far the workaround is to remove the node_modules folder and do npm i again, that solves it for me @avirup

This is why we are trying to upgrade electron to v5, seeing if we can use napi libs, and if possible also move to nodejs 12, but still in progress.

1 Like

This topic was automatically closed after 60 days. New replies are no longer allowed.