Loading fails on Raspberry Pi
after installing the node through npm, when I start node-RED on my raspberry pi zero i can read these lines and the node won't appear.
pi : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py info
pam_unix(sudo:session): session opened for user root by (uid=0)
pam_unix(sudo:session): session closed for user root
/usr/lib/node_modules/node-red-contrib-python-function/lib/python-function.js:6
return fnCode.split('\n').map((line) => Array(depth).join(' ') + line).joi
^
18 Aug 16:54:56 - [warn] ------------------------------------------
18 Aug 16:54:56 - [warn] Failed to register 1 node type
18 Aug 16:54:57 - [warn] Run with -v for details
18 Aug 16:54:57 - [warn] ------------------------------------------
Thanks for reporting. Can you provide which version of node-RED and Node.js are being used?
ok, I think i solved it by updating Node.js from the default 0.12.something to 4.5.0. However on the RasPi 0 (ARM6) the repositories to update it don't work, and it must be done manually using the binaries.
I know it shouldn't be a problem for the average user, but it was a bit painful for me as a nearly absolute Noob! ;)
From what i understood the main problem should be the use of arrow functions (according to jshint.com).
Also, another question: how do I access the context from within the python function node?