I am trying to install nodes in node-red without internet (offline). I have npm pack file (.tgz) and trying to install use admin method "/nodes" POST (POST /nodes : Node-RED), but "I am getting module not found error".
I tried few things :
I extracted the .tgz file and gave path to package.json of nodes.
I tried to give the path of dir where the package.json is present.
I didn't extract it and gave path of .tgz file. (I know it will not work according to doc)
can anyone please suggest what I am doing wrong here or any other alternative method ?
You can install NPM packages with no internet, really easily:
The problem you will face, is when those packages have dependencies, NPM will try and pull them down from the NPM registry.
You options are:
Go for a dependency walk (Good Luck)
Install all nodes you need, on a machine WITH internet, then move the node_modules folder over, but if the platform architectures are different - you going to have issues with Native modules, you can rebuild them however, so maybe not so much of a problem.
In general, I don't think nodes should be including a 'bundleDependencies' themselves... but if you're in a position of needing to pack them for offline install, you'll need to do the work to ensure the dependencies get included.
But some nodes are installing and for some nodes sometimes i'm getting {"code":"unexpected_error","message":"Install failed"} , it is sporadic not everytime, for 4 to 5 times it is failing and if i try again node is installing, sometimes if i try continuosly 10 to 15 times also node is not installing(tries with /node-red-contrib-enigma-0.0.1.tgz node).
Can you please suggest me how i can resolve this issue? and how much size it will support to install offline(will it support all the nodes).