add npm to $PATH ubuntu

C++
 sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

Source

Also in C++: