This is my public notebook.
Fix owner permissions on npm global package installation. First check that npm prefix is set to /usr/local using “npm config get prefix”
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}