Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error #7

Open
nathanziarek opened this issue Aug 29, 2018 · 3 comments
Open

Build Error #7

nathanziarek opened this issue Aug 29, 2018 · 3 comments

Comments

@nathanziarek
Copy link

Followed the directions to install g++ 4.8 as well as wiringPi, but still having issues installing this node component.

I'm not competent enough in this type of software to understand what's going on, although nothing jumps out at me. I'd guess it's a node-gyp issue, which another user mentioned, but I don't understand how to implement his proposed solution

pi@raspberrypi:~/Source/node-hx711 $ npm install hx711 --save

> hx711@0.3.0 install /home/pi/Source/node-hx711/node_modules/hx711
> node-gyp rebuild

make: Entering directory '/home/pi/Source/node-hx711/node_modules/hx711/build'
  CXX(target) Release/obj.target/hx711/binding.o
../binding.cpp: In static member function ‘static void HX711Wrapper::New(const v8::FunctionCallbackInfo<v8::Value>&)’:
../binding.cpp:159:61: error: no matching function for call to ‘v8::Function::NewInstance(const int&, v8::Local<v8::Value> [2])’
       args.GetReturnValue().Set(cons->NewInstance(argc, argv));
                                                             ^
../binding.cpp:159:61: note: candidates are:
In file included from /home/pi/.node-gyp/10.9.0/include/node/node.h:63:0,
                 from ../binding.h:1,
                 from ../binding.cpp:1:
/home/pi/.node-gyp/10.9.0/include/node/v8.h:3976:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^
/home/pi/.node-gyp/10.9.0/include/node/v8.h:3976:44: note:   candidate expects 3 arguments, 2 provided
/home/pi/.node-gyp/10.9.0/include/node/v8.h:3979:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^
/home/pi/.node-gyp/10.9.0/include/node/v8.h:3979:44: note:   candidate expects 1 argument, 2 provided
hx711.target.mk:98: recipe for target 'Release/obj.target/hx711/binding.o' failed
make: *** [Release/obj.target/hx711/binding.o] Error 1
make: Leaving directory '/home/pi/Source/node-hx711/node_modules/hx711/build'
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:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Linux 4.14.50+
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/pi/Source/node-hx711/node_modules/hx711
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm WARN testing-hx711@1.0.0 No description
npm WARN testing-hx711@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hx711@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hx711@0.3.0 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/pi/.npm/_logs/2018-08-29T19_15_53_463Z-debug.log
@arronhunt
Copy link

I'm also seeing this error on install.

> node -v
v11.6.0
> npm  -v
6.5.0

@t0m82
Copy link

t0m82 commented Jul 11, 2019

I'm facing the same error too. Any solution for that yet?

@makander
Copy link

makander commented Sep 9, 2019

I just managed to get this to work by using v8 of node.
npm install -g n
n v8.16.1

Edit:
https://raspberrypi.stackexchange.com/a/101115 <- Instructions for installing g++ 4.8, in case anyone needs that too.

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

No branches or pull requests

4 participants