Node-red-contrib-socketcan 1.0.11 installation failed

If you follow the link to the node's github repository you will find that it is a dead link, so presumably the node is no longer supported, which is not a good start.

I don't know why it won't install though. Whether it is worth investigating for a dead contrib node I don't know.

Not fixed on a special node, only need a node to read CanBus data from our PLC.
(canbus utils already working)

I have tried another node:

-----------------------------------------------------------
2021-03-27T11:14:55.300Z installieren : node-red-contrib-can 1.1.2

2021-03-27T11:14:55.797Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production node-red-contrib-can@1.1.2
2021-03-27T11:15:34.827Z [out] 
2021-03-27T11:15:34.827Z [out] > socketcan@2.8.0 install /.node-red/node_modules/socketcan
2021-03-27T11:15:34.827Z [out] > node-gyp rebuild
2021-03-27T11:15:34.827Z [out] 
2021-03-27T11:15:45.943Z [err] gyp
2021-03-27T11:15:45.949Z [err]  
2021-03-27T11:15:45.951Z [err] ERR!
2021-03-27T11:15:45.953Z [err]  
2021-03-27T11:15:45.955Z [err] configure error
2021-03-27T11:15:45.957Z [err]  
2021-03-27T11:15:45.971Z [err] gyp
2021-03-27T11:15:45.973Z [err]  
2021-03-27T11:15:45.975Z [err] ERR!
2021-03-27T11:15:45.977Z [err]  
2021-03-27T11:15:45.985Z [err] stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
2021-03-27T11:15:45.985Z [err] gyp ERR! stack   File "<string>", line 1
2021-03-27T11:15:45.985Z [err] gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
2021-03-27T11:15:45.985Z [err] gyp ERR!
2021-03-27T11:15:46.015Z [err]  
2021-03-27T11:15:46.017Z [err] stack
2021-03-27T11:15:46.025Z [err]                                 ^
2021-03-27T11:15:46.025Z [err] gyp ERR! stack SyntaxError: invalid syntax
2021-03-27T11:15:46.025Z [err] gyp ERR! stack 
2021-03-27T11:15:46.025Z [err] gyp ERR! stack     at ChildProcess.exithandler (child_process.js:281:12)
2021-03-27T11:15:46.025Z [err] gyp ERR! 
2021-03-27T11:15:46.026Z [err] stack
2021-03-27T11:15:46.028Z [err]      at emitTwo (events.js:126:13)
2021-03-27T11:15:46.030Z [err] gyp
2021-03-27T11:15:46.031Z [err]  
2021-03-27T11:15:46.045Z [err] ERR! stack     at ChildProcess.emit (events.js:214:7)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:336:11)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack     at emitOne (events.js:116:13)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack     at Socket.emit (events.js:211:7)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:561:12)
2021-03-27T11:15:46.045Z [err] gyp
2021-03-27T11:15:46.047Z [err]  
2021-03-27T11:15:46.048Z [err] ERR!
2021-03-27T11:15:46.050Z [err]  
2021-03-27T11:15:46.052Z [err] System
2021-03-27T11:15:46.065Z [err]  Linux 4.14.195
2021-03-27T11:15:46.065Z [err] gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-03-27T11:15:46.065Z [err] gyp ERR! cwd /.node-red/node_modules/socketcan
2021-03-27T11:15:46.065Z [err] gyp ERR! node -v v8.16.1
2021-03-27T11:15:46.065Z [err] gyp ERR! node-gyp -v v3.8.0
2021-03-27T11:15:46.065Z [err] gyp ERR! not ok 
2021-03-27T11:15:46.977Z [err] npm
2021-03-27T11:15:46.980Z [err]  
2021-03-27T11:15:46.982Z [err] ERR!
2021-03-27T11:15:46.983Z [err]  
2021-03-27T11:15:46.995Z [err] code ELIFECYCLE
2021-03-27T11:15:46.995Z [err] npm ERR! errno 1
2021-03-27T11:15:47.007Z [err] npm
2021-03-27T11:15:47.009Z [err]  
2021-03-27T11:15:47.010Z [err] ERR!
2021-03-27T11:15:47.013Z [err]  socketcan@2.8.0 install: `node-gyp rebuild`
2021-03-27T11:15:47.025Z [err] npm ERR! Exit status 1
2021-03-27T11:15:47.025Z [err] npm ERR! 
2021-03-27T11:15:47.025Z [err] npm ERR! Failed at the socketcan@2.8.0 install script.
2021-03-27T11:15:47.025Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-03-27T11:15:47.092Z [err] 
2021-03-27T11:15:47.095Z [err] npm
2021-03-27T11:15:47.097Z [err]  
2021-03-27T11:15:47.098Z [err] ERR!
2021-03-27T11:15:47.105Z [err]  A complete log of this run can be found in:
2021-03-27T11:15:47.105Z [err] npm ERR!     /.npm/_logs/2021-03-27T11_15_47_056Z-debug.log
2021-03-27T11:15:47.143Z rc=1

I don't know python, but is that complaining because you have python3 rather then 2? Just a guess though on my part.

Maybe, yes. But I will not downgrade my python now to get nodes for canbus socket running.
It was a try, so I will go back to python script to read the canbus data and send it to MQTT broker.
I thought it was a good start to get familiar with nodes.

Did you follow the proper setup instructions for node-gyp?

Gyp did only support Python 2 for a long time, but that seems to have changed with recent versions.

If you already have a working script then that sounds a good way to go. Then you are not reliant on a contrib node.

In principal yes, I can already read values from Canbus (socketcan) by python script.

I have finished the communication with py, no node red for the moment.
Will give a try on node red next.
thanks kuema and colin for support !
You can close the thread

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