Installing node-red modules

#1

Hi,

I want to install a node-red module in a multitech conduit gateway. The problem is that the gateway doesn't have internet connection so I can't use npm. I am trying to download from github the module and send it to the gateway via SFTP (WinSCP). I put it in the directory "/opt/node-red/node_modules" but the problem is that de module doesn't appear in the node-red palette.

Thank you.

0 Likes

#2

I "think" (but am not sure) - that you can sftp the file into your home directory on the gateway, then ssh in - cd into the .node-red directory - and then run npm install ../your_node_file_name to install it- then stop and restart Node-RED.

But note the version of node.js and Node-RED on the gateway. Some newer nodes may or may not be installable on older versions.

0 Likes

#3

I tried what you suggested but I didn'g get any positive results. I finally got an internet connection, the problem is that commands like npm install -g "name of the node-red module" show me an error. Error is :

npm ERR! Linux 3.12.70
npm ERR! argv "node" "/usr/bin/npm" "install" "node-red-contri-opcua-master"
npm ERR! node v0.10.48
npm ERR! npm  v2.15.1
npm ERR! code E404

npm ERR! 404 Not found : node-red-contri-opcua-master
npm ERR! 404
npm ERR! 404 'node-red-contri-opcua-master' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'node-red'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/node-red/node_modules/npm-debug.log

0 Likes

#4

Spot the typo.
But your node version (0.10.8) is ancient. The recommended versions for node-red and 8.x or 10.x. The npm is also ancient.

0 Likes

#5

@colin I’m not sure later versions of nodejs are available for the multi tech device.

0 Likes

#6

I known that both are ancient versions. The problem is that I am not being able to update node and npm because I obtain error messages. I don't know if it's due to I am working with a multitech device. If someone could tell me if it's possible I would really appreciate it

0 Likes

#7

So did you fix the typo error in your install command that I pointed out?

0 Likes

#8

yes but it didn't work

0 Likes

#9

So show us the error you get when you install using npm install. Presumably it is a different error.
Copy/paste the result of the install command here. It may well be that they don't work with the old nodejs and npm.

0 Likes

#10

the error now is the following:

npm ERR! Linux 3.12.70
npm ERR! argv "node" "/usr/bin/npm" "install" "node-red-contrib-opcua-master"
npm ERR! node v0.10.48
npm ERR! npm  v2.15.1
npm ERR! code E404

npm ERR! 404 Not found : node-red-contrib-opcua-master
npm ERR! 404
npm ERR! 404 'node-red-contrib-opcua-master' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'node-red'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/node-red/node_modules/npm-debug.log

0 Likes

#11

Sometimes there is a clue in the error message. Did you try searching for that on the npm site? It isn't there. There is a node-red-contrib-opcua.
Are you sure you have the right name?

0 Likes