I don't know ho to do this manually with the files, like from a local drive/USB.
But assuming that the host node-red is running on has some kind of networking capabilities, the easier method would be to bring (mobile) internet to the site for the time you do the install....use a mobile phone as Wifi-hotspot maybe?
Thanks for both!
The server where NodeRed is running does not have Internet access (for security reasons), so it could not perform this task.
But I can upload package! Now my question is if this type of node (node-red-contrib-s7) I can install only the first package or I have to install all the ones that are appearing in node_modules.
Another alternative is to setup another machine that does have internet access with exactly the same OS and version with the same version of nodejs and the same node-red installed in the same way. Then install the node on that machine and copy the whole .node-red folder (or wherever your node red user directory is) to the production machine.
I have tried in a similar environment, I installed Node-RED, disconnected the PC from the network and I can't load the .tgz. I get the following log:
-----------------------------------------------------------
2024-04-04T13:29:10.254Z Instalar : node-red-contrib-s7-0.1.0.tgz
2024-04-04T13:29:10.640Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict C:\Users\54935\.node-red\nodes\node-red-contrib-s7-0.1.0.tgz
2024-04-04T13:29:11.399Z [err] npm
2024-04-04T13:29:11.400Z [err] WARN config production Use --omit=dev instead.
2024-04-04T13:30:45.927Z [err] npm ERR!
2024-04-04T13:30:45.927Z [err] code ENOTFOUND
2024-04-04T13:30:45.927Z [err] npm ERR!
2024-04-04T13:30:45.927Z [err] syscall getaddrinfo
2024-04-04T13:30:45.927Z [err] npm ERR!
2024-04-04T13:30:45.927Z [err]
2024-04-04T13:30:45.928Z [err] errno ENOTFOUND
2024-04-04T13:30:45.932Z [err] npm ERR! network
2024-04-04T13:30:45.932Z [err] request to https://registry.npmjs.org/nodes7 failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
2024-04-04T13:30:45.932Z [err] npm
2024-04-04T13:30:45.932Z [err] ERR! network This is a problem related to network connectivity.
2024-04-04T13:30:45.932Z [err] npm ERR! network In most cases you are behind a proxy or have bad network settings.
2024-04-04T13:30:45.932Z [err] npm ERR! network
2024-04-04T13:30:45.933Z [err] npm ERR! network If you are behind a proxy, please make sure that the
2024-04-04T13:30:45.933Z [err] npm ERR!
2024-04-04T13:30:45.933Z [err] network 'proxy' config is set properly. See: 'npm help config'
2024-04-04T13:30:45.938Z [err]
2024-04-04T13:30:45.938Z [err] npm ERR! A complete log of this run can be found in: C:\Users\54935\AppData\Local\npm-cache\_logs\2024-04-04T13_29_11_358Z-debug-0.log
2024-04-04T13:30:45.955Z rc=1
I then tested by connecting the PC to the network and the installation ran successfully.
What other way could I try?
BR
Admin edit: wrap logs in a code bock for reabaility and preserving formatting
I have managed to install the node-red-contrib-s7 package as you specified, but the same has not happened with node-red-contrib-opcua. The latter took longer to compress and then gave me an error on installation.