“Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules'” DON’T SUDO!!!!
Please understand what you are doing when you use sudo. sudo is the superuser. So if you install something with sudo, sudo is now the owner of what was installed. The much better approach is to change ownership of the installation path to your username.
#For node modules sudo chown -R username /usr/local/lib/node_modules #So npm can add softlinks to path sudo chown -R username /usr/local/bin