Mac Catalina 10.15.6
I already had npm installed. I wanted to upgrade so I ran the following.
npm install -g npm
Below is the output:
$name@$names-MacBook-Pro desktop % npm install -g npm /usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js npm ERR! code EEXIST npm ERR! syscall symlink npm ERR! path ../../../lib/node_modules/npm/man/man1/npm-bin.1 npm ERR! dest /usr/local/share/man/man1/npm-bin.1 npm ERR! errno -17 npm ERR! EEXIST: file already exists, symlink '../../../lib/node_modules/npm/man/man1/npm-bin.1' -> '/usr/local/share/man/man1/npm-bin.1' npm ERR! File exists: /usr/local/share/man/man1/npm-bin.1 npm ERR! Remove the existing file and try again, or run npm npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in: npm ERR!
/Users/$name/.npm/_logs/2020-10-04T14_41_02_611Z-debug.log
Now all NPM commands fail.
zsh: command not found: npm
Everything from:
npm -v
sudo npm install npm -g