I installed Node on El Capitan using the package from their website.
I check to see if
Well, your npm upgrade failed, which means that either:
the symlink /usr/local/bin/npm that pointed to the actual script was removed, but it failed when trying to remove the actual npm files and hence, never reinstalled a new symlink
the /usr/local/lib/node_modules/npm stuff actually got removed, but not the folder, hence the upgrade failed.
npm should point like this from /usr/local/bin:
npm -> ../lib/node_modules/npm/bin/npm-cli.js
Hope that helps. If the actual npm-cli.js file is actually gone, your best bet is to just re-install node and then upgrade with sudo.