How do I run terminal in sudo mode?
sudo -s is far easier than enabling the root user since it just starts up a shell with root permissions as a one step, on demand action. Not only is it fast, but it doesn't need to be reconfigured when you don't need the root user and doesn't expose the server to any more risk or vulnerability that adding a root user would entail.

Of course for npm you could just follow the directions and type:

sudo -H npm "install" "." "--force" "--global"


That still makes the npm command "root" and skips the log out step to get back out of root.