Using modules Offline

Hi All,
I'm trying to use otpauth otpauth - npm inside of Nodered function node using the modules import Use any npm module in Node-RED • FlowFuse.
The issue is that the node red doesn't reach internet.
When deploying I get the error that the connection was closed
What I do as usual to install offline npm stuff is installing on internet machines and then copy/paste inside of the offline nodered.
But in this case it seems like even after copy paste, it always try to run npm install command.

Any idea of a fix for that ?

thanks,
Flo

Copy paste will not update the package json.

It might be better to do it old skool.

add a require in your settings.js

See functionGlobalContext in docs: Configuration : Node-RED

Well tried, it failed to load the settings.js.
After more googling i find out we may need to run:

npm i --package-lock-only

and it update the package and did the trick !

thanks !