I tried last two days to install Node-Red, Mosquitto and SQLITE with you script on debian jessie image and failed. It failed on gyp rebuild stage twice. Will try it today with xenial image.
Edit. I have read that ubuntu is not supported by the script. I've tried 3. time with clean jessie image and it worked! Node Red is up. Update the webmin as suggested was a bad idea (. Look the next evening on it.