From a connected PC download
https://nodejs.org/download/release/v12.13.1/SHASUMS256.txt
https://nodejs.org/download/release/v12.13.1/node-v12.13.1-headers.tar.gz
Put the two files in a folder, then inside the folder run
npm init -y
npm install http-server
node_modules/.bin/http-server &
Now the folder is serving as local webserver.
Install gyp using this folder as mirror
NODEJS_ORG_MIRROR=http://localhost:8080 node $NODE_HOME/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js install
Now node gyp is installed, kill server and delete folder
fg
then CTRL+C to kill server
rm -rf <FOLDERNAME>
to remove folder
Done!
Also... a faster way is to create the following structure:
mkdir -p $HOME/.node-gyp/12.13.1
echo 9 > $HOME/.node-gyp/12.13.1/installVersion
cp -r $NODE_HOME/include $HOME/.node-gyp/12.13.1