Support Node >8
team-p5x opened this issue · 10 comments
Hi,
i have problems installing node-can with npm when having a Node Version greater than 8.
Is there a trick or am i doing something wrong?
I tried 'npm install node-can' command on a linux machine and got errors concerning to 'make'.
My error pretty much looked like in
#52
The package was renamed to socketcan a couple of months ago.
Excuse me, of course I typed "npm install socketcan".
Can you please reopen the issue?
Hi.
There is still a Problem using Node >8 with the Raspberry Pi.
had problems with v10.16.3
downgraded to v8.16.0 and it was ok.
Wanted to use: node-red-contrib-canbus
which needs socketcan to work.
So... it node v8 is a option, you an use it as workarround...:
node -v
to show actual version
sudo npm install -g n
to install n
sudo n 8.16.0
to downgrade to specivic version
node -v
to check actual version
Here is the error-log for the developers:
i hope it helps...
..... ../src/signals.cc:111:35: error: no matching function for call to ‘v8::Value::ToUint32()’ offset = info[1]->ToUint32()->Uint32Value(); ^ In file included from /home/pi/.cache/node-gyp/10.16.3/include/node/node.h:63, from ../../../../nan/nan.h:54, from ../src/signals.cc:18: /home/pi/.cache/node-gyp/10.16.3/include/node/v8.h:2435:44: note: candidate: ‘v8::MaybeLocal<v8::Uint32> v8::Value::ToUint32(v8::Local<v8::Context>) const’ V8_WARN_UNUSED_RESULT MaybeLocal<Uint32> ToUint32( ^~~~~~~~ /home/pi/.cache/node-gyp/10.16.3/include/node/v8.h:2435:44: note: candidate expects 1 argument, 0 provided ../src/signals.cc:112:35: error: no matching function for call to ‘v8::Value::ToUint32()’ bitLength = info[2]->ToUint32()->Uint32Value(); ^ In file included from /home/pi/.cache/node-gyp/10.16.3/include/node/node.h:63, from ../../../../nan/nan.h:54, from ../src/signals.cc:18: /home/pi/.cache/node-gyp/10.16.3/include/node/v8.h:2435:44: note: candidate: ‘v8::MaybeLocal<v8::Uint32> v8::Value::ToUint32(v8::Local<v8::Context>) const’ V8_WARN_UNUSED_RESULT MaybeLocal<Uint32> ToUint32( ^~~~~~~~ /home/pi/.cache/node-gyp/10.16.3/include/node/v8.h:2435:44: note: candidate expects 1 argument, 0 provided ../src/signals.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE EncodeSignal(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/signals.cc:203:46: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] Local<Object> jsData = info[0]->ToObject(); ^ In file included from /home/pi/.cache/node-gyp/10.16.3/include/node/node.h:63, from ../../../../nan/nan.h:54, from ../src/signals.cc:18: /home/pi/.cache/node-gyp/10.16.3/include/node/v8.h:10046:15: note: declared here Local<Object> Value::ToObject() const { ^~~~~ ../src/signals.cc:212:32: error: no matching function for call to ‘v8::Value::ToUint32()’ offset = info[1]->ToUint32()->Uint32Value(); ^ In file included from /home/pi/.cache/node-gyp/10.16.3/include/node/node.h:63, from ../../../../nan/nan.h:54, from ../src/signals.cc:18: /home/pi/.cache/node-gyp/10.16.3/include/node/v8.h:2435:44: note: candidate: ‘v8::MaybeLocal<v8::Uint32> v8::Value::ToUint32(v8::Local<v8::Context>) const’ V8_WARN_UNUSED_RESULT MaybeLocal<Uint32> ToUint32( ^~~~~~~~ /home/pi/.cache/node-gyp/10.16.3/include/node/v8.h:2435:44: note: candidate expects 1 argument, 0 provided ../src/signals.cc:213:35: error: no matching function for call to ‘v8::Value::ToUint32()’ bitLength = info[2]->ToUint32()->Uint32Value(); ^ In file included from /home/pi/.cache/node-gyp/10.16.3/include/node/node.h:63, from ../../../../nan/nan.h:54, from ../src/signals.cc:18: /home/pi/.cache/node-gyp/10.16.3/include/node/v8.h:2435:44: note: candidate: ‘v8::MaybeLocal<v8::Uint32> v8::Value::ToUint32(v8::Local<v8::Context>) const’ V8_WARN_UNUSED_RESULT MaybeLocal<Uint32> ToUint32( ^~~~~~~~ /home/pi/.cache/node-gyp/10.16.3/include/node/v8.h:2435:44: note: candidate expects 1 argument, 0 provided ../src/signals.cc:218:44: error: no matching function for call to ‘v8::Value::ToNumber()’ ...
Hi.
I am cross compiling for arm against various versions of node 10 without a single issue. I remember someone using node-red-contrib-canbus having an issue. I think the problem there was it depending on an outdated version of node-can. Which version of node-can are you trying to build?
Hi,
node-can (socketcan) version is: socketcan@^2.4.0
Hi,
does it error out in the same way when you try to install it via npm as a standalone package?
Just as another datapoint: Have updated to 10.16.3 -> also builds fine (npm standalone install).
I think i got the problem. I installed node-red-contrib-canbus via the node-red palette manager.
in the actual node-red-contrib-canbus/package.json
there is the part :
"dependencies": { "socketcan": "2.1.x", "random-js": "1.0.x" },
So.. what it then does: It installs socketcan v2.1.3 as another "submodule"
~/.node-red/node_modules/node-red-contrib-canbus/node_modules/socketcan
The problem is the outdated package.json from node-red-contrib-canbus
Sorry i did not see it before...
Closed as issue was in local configuration.