Npm doesn’t work well with sudo. Instead you should try to install as suggested on the homepage.