Node-red-contrib-knx install problem



I try to install node-red-contrib-knx on a raspberry PI3 - when executing the following command in the folder "pi@RaspHarmon:~/.node-red " I get an error message:

Command: "npm install node-red-contrib-knxjs"
(node:16462) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR!
npm ERR! System Linux 4.14.71-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "node-red-contrib-knxjs"
npm ERR! cwd /home/pi/.node-red
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/.node-red/npm-debug.log
npm ERR! not ok code 0

Same with command "npm install knx"

Is this a problem with dependencies?

Raspberry Version (uname -a): Linux RaspHarmon 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux

Best regards



Wow, that is an ancient version of npm, I am on 6.4.1. I suspect that may be the problem. Did you install/update node-red on the pi using the recommended method [1] using the bash <(curl script. If not then I suggest you do that.




Thx a lot Colin, that was the problem - update to newest npm 6.x solved the issue.

What seems strange to me: I bought a new Raspberry PI 3+ at September, I installed Raspbian version June 2018, I upgraded/updated apt - but the system contains a such old npm :roll_eyes:

Thx for your help and best regards



Raspbian has been a long way behind with its versions of node.js and npm. This is one of the reasons we provide an install script for Raspbian that gets you onto modern node, npm and node-red versions.



Yes I found this link before starting with node-red - But I stopped after reading the first sentence:

From June 2018 Node-RED can be installed from the Pi Menu - Preferences - Recommended Software application installed on the Raspbian SD card image that can be downloaded from If installed in this manner it can be upgraded either by using sudo apt-get upgrade or using the script below.

Cause I thought, installing Node-Red from the Pi Menu Recommended Software is enought and there are no needs then to using the script.

Maybe the author of the script can add an hint about the risk, that installing only via Recomended Software results in an very very old and incompatible (regarding the current Node-Red Version) npm.



Good point. Will do.