Recommendations
Use nvm to manage node versions
nvm installs node in your user’s home directory without needing superuser privileges. It also allows you to toggle between versions of node effortlessly. You can use nvm to install node on your server as well.
Do not use sudo with npm
You may receive an EACCES error when you try to install a package globally. This indicates that you do not have permission to write to the directories that npm uses to store global packages and commands.
The fix is documented here: https://docs.npmjs.com/getting-started/fixing-npm-permissions
https://www.youtube.com/watch?v=bxvybxYFq2o