Fresh install of Raspbian Buster on RPi4, but I changed umask from 022 to 077 as part of my post-install customisations. The install script fails every time at "Failed to install Node.js - Exit" without anything helpful in the log. It wasn't until I checked where the npm link in /usr/bin went that I realised that some dirs were not accessible to user pi. I fixed it by "chmod -R go+rX /usr/lib/node_modules/" (and setting umask=022 for now) and running the script again which then finished successfully.
I think umask=077 is a sane setting on any multiuser system and it would be good if the install script tried to anticipate umask settings other than 022. Thanks for all your efforts!