Node Red Import Error

Hello, I am trying to install a third party Azure IoT Hub node but I think it failed because of the proxy at work. How do I set this up in Node Red?

2024-08-20T18:45:01.024Z Install : node-red-contrib-azure-iot-hub 0.4.0

2024-08-20T18:45:58.948Z [err] npm

2024-08-20T18:45:58.948Z [err] ERR!

2024-08-20T18:45:58.949Z [err] code

2024-08-20T18:45:58.949Z [err] ETIMEDOUT

2024-08-20T18:45:58.950Z [err] npm

2024-08-20T18:45:58.950Z [err] ERR! syscall connect

2024-08-20T18:45:58.951Z [err] npm ERR!

2024-08-20T18:45:58.951Z [err]

2024-08-20T18:45:58.951Z [err] errno ETIMEDOUT

2024-08-20T18:45:58.959Z [err] npm

2024-08-20T18:45:58.959Z [err] ERR! network request to https://registry.npmjs.org/node-red-contrib-azure-iot-hub failed, reason: connect ETIMEDOUT 104.16.26.34:443

2024-08-20T18:45:58.960Z [err] npm ERR!

2024-08-20T18:45:58.960Z [err] network This is a problem related to network connectivity.

2024-08-20T18:45:58.960Z [err] npm

2024-08-20T18:45:58.960Z [err] ERR! network In most cases you are behind a proxy or have bad network settings.

2024-08-20T18:45:58.960Z [err] npm

2024-08-20T18:45:58.961Z [err] ERR! network

2024-08-20T18:45:58.961Z [err] npm ERR! network If you are behind a proxy, please make sure that the

2024-08-20T18:45:58.961Z [err] npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’

2024-08-20T18:45:58.968Z [err]

2024-08-20T18:45:58.968Z [err] npm

2024-08-20T18:45:58.968Z [err] ERR! A complete log of this run can be found in:

2024-08-20T18:45:58.968Z [err] npm ERR! /home/ncdio/.npm/_logs/2024-08-20T18_38_18_423Z-debug-0.log

2024-08-20T18:45:58.985Z rc=1

Sounds like you would need to give Node-Red an environment variable named HTTP_PROXY;

Here is an excerpt from the settings.js, which is where I first assumed you would need to set it, but looks like not. Looks like it just need an environment variable.

/** If you need to set an http proxy please set an environment variable
 * called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system.
 * For example - http_proxy=http://myproxy.com:8080
 * (Setting it here will have no effect)
 * You may also specify no_proxy (or NO_PROXY) to supply a comma separated
 * list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk
 */

https://nodered.org/docs/user-guide/runtime/settings-file