Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Error installing node-hid for DApp on Mac OSX #197

Closed
innopreneur opened this issue Sep 10, 2018 · 6 comments
Closed

Error installing node-hid for DApp on Mac OSX #197

innopreneur opened this issue Sep 10, 2018 · 6 comments

Comments

@innopreneur
Copy link

I am unable to use dApp because on npm install I get following error (see stack trace below) -

Environment details -

node - v8.9.4
npm - v5.6.0
mac osx - macOS High Sierra (v10.13.6 )
hidapi - v0.8.0-rc1 (is already installed)

Below is the stack trace -

node-pre-gyp http GET https://github.com/node-hid/node-hid/releases/download/0.5.4/HID-v0.5.4-node-v64-darwin-x64.tar.gz
node-pre-gyp http 404 https://github.com/node-hid/node-hid/releases/download/0.5.4/HID-v0.5.4-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://github.com/node-hid/node-hid/releases/download/0.5.4/HID-v0.5.4-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/node-hid/node-hid/releases/download/0.5.4/HID-v0.5.4-node-v64-darwin-x64.tar.gz
node-pre-gyp verb command build [ 'rebuild' ]
node-pre-gyp ERR! Tried to download(undefined): https://github.com/node-hid/node-hid/releases/download/0.5.4/HID-v0.5.4-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http Connection closed while downloading tarball file
node-pre-gyp verb command build [ 'rebuild' ]
  CC(target) Release/obj.target/hidapi/hidapi/mac/hid.o
  CC(target) Release/obj.target/hidapi/hidapi/mac/hid.o
../hidapi/mac/hid.c:252:20: warning: comparison of integers of different signs: 'CFIndex' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
                if (chars_copied == len)
                    ~~~~~~~~~~~~ ^  ~~~
../hidapi/mac/hid.c:252:20: warning: comparison of integers of different signs: 'CFIndex' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
                if (chars_copied == len)
                    ~~~~~~~~~~~~ ^  ~~~
1 warning generated.
1 warning generated.
rm: ./Release/.deps/Release/obj.target/hidapi/hidapi/mac/hid.o.d.raw: No such file or directory
make: *** [Release/obj.target/hidapi/hidapi/mac/hid.o] Error 1
gyp  LIBTOOL-STATIC Release/hidapi.a
 ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.5.0_1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/build/Release/HID.node" "--module_name=HID" "--module_path=/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/build/Release"
gyp ERR! cwd /Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.5.0_1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/build/Release/HID.node --module_name=HID --module_path=/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/build/Release' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.5.0_1/bin/node" "/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid
node-pre-gyp ERR! node -v v10.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.5.0_1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/build/Release/HID.node --module_name=HID --module_path=/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/build/Release' (1)
  CXX(target) Release/obj.target/HID/src/HID.o
../src/HID.cc:34:10: fatal error: 'hidapi.h' file not found.4~install: Failed to exec install script
#include <hidapi.h>
         ^~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/HID/src/HID.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.5.0_1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/build/Release/HID.node" "--module_name=HID" "--module_path=/Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid/build/Release"
gyp ERR! cwd /Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!     /Users/mgpt/.npm/_logs/2018-09-10T13_45_16_911Z-debug.log
innoprenuers-mbp:dapp mgpt$ npm i

> [email protected] install /Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid
> node-pre-gyp install --fallback-to-build

gyp ERR! cwd /Users/mgpt/projects/practise/MultiSigWallet/dapp/node_modules/node-hid
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!     /Users/mgpt/.npm/_logs/2018-09-10T13_53_29_712Z-debug.log

@nethunter
Copy link

Same here, anybody found a solution yet?

@chornobils
Copy link

chornobils commented Sep 30, 2018

Same on GNU/Linux

UPD

solved it with downgrading node from 10 to 8 with n command

@giacomolicari
Copy link
Contributor

@doctorx32 check this out #178, hope it helps.

@nethunter
Copy link

Downgrading to Node 8 helped me as well.

@arthurk
Copy link

arthurk commented Dec 11, 2018

It would be very helpful to mention the node version 8 requirement in the readme

@kentarohorie
Copy link

kentarohorie commented Jan 16, 2019

Also, it would be helpful to mention the python version 2.7.x because of

https://github.com/nodejs/node-gyp

(v2.7 recommended, v3.x.x is not supported)

And I needed this

#178 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants