I have a well established Node-Red implementation running on a Google Cloud Platform machine under Ubuntu 16.04. I recently tried adding The Things Network (node-red-contrib-ttn) whcih failed. After working through on my windows laptop Node-red implementation I discovered that you need GIT installed and ready to run BEFORE you install TTN.
All well and good, but now I cannot uninstall node-red-contrib-ttn from my Ubuntu machine, so I can re-install it.
I get “failed to uninstall ttn” and read the log file to find out why. But Node-Red is a service so no console output to show me why I cannot uninstall. Now what should I do?
Also, you are running node v4 which is beyond end of life, so may not work correctly with newer nodes.
The permissions are the main problem, but this may also cause issues very soon.
Using CHOWN completely destroyed my computer, I lost sudo access and being a GCP server I don’t have root access. So I had to delete the virtual machine and start again from scratch. The dangers of CHOWN!
Having now done a clean install of npm (3.5.2) and node (v4.2.6) I cannot install TTN at all as it is failing at grpc. It looks almost like grpc is not installed. I tried a clean install of this using
npm install grpc
but this threw up hundreds of errors
smbunn61@simon-server:~$ npm install grpc
> grpc@1.12.2 install /home/smbunn61/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack TypeError: this is not a typed array.
node-pre-gyp ERR! stack at Function.from (native)
node-pre-gyp ERR! stack at Object.<anonymous> (/home/smbunn61/node_modules/grpc/node_modules/tar/lib/parse.js:33:27)
node-pre-gyp ERR! stack at Module._compile (module.js:410:26)
node-pre-gyp ERR! stack at Object.Module._extensions..js (module.js:417:10)
node-pre-gyp ERR! stack at Module.load (module.js:344:32)
node-pre-gyp ERR! stack at Function.Module._load (module.js:301:12)
node-pre-gyp ERR! stack at Module.require (module.js:354:17)
node-pre-gyp ERR! stack at require (internal/module.js:12:17)
node-pre-gyp ERR! stack at Object.<anonymous> (/home/smbunn61/node_modules/grpc/node_modules/tar/lib/list.js:10:16)
node-pre-gyp ERR! stack at Module._compile (module.js:410:26)
node-pre-gyp ERR! System Linux 4.13.0-1017-gcp
node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/smbunn61/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
So I have just about given up. Can the TTN palette be installed?
As Dave has already mentioned Node v4 is end-of-life
But you really shouldn’t have as many issues as your are experiencing. Have you opened an issue on the github page for the node ( see the nodes page on flows.nodered.org for a link )
If you are installing on vanilla Ubuntu then you can actually use the install script from our Pi install instructions, as that is also Debian based like Ubuntu. Just run it as the user you want to run Node-RED as and it should install both node.js and Node-RED for you to get you a working Node-RED… what you do to break it after that is up t you