--- lib/update.js.orig 2013-06-21 13:44:01.000000000 +0200 +++ lib/update.js 2013-06-26 21:18:40.000000000 +0200 @@ -35,6 +35,14 @@ , req = ww[4] , url = require('url') + if (what.match(/^npm@/) && where.match(/@@NPM_PATH_JSREGEX@@/)) { + log.error("Trying to update '" + what + "' in '" + where + "'") + log.error("which is part of the MacPorts npm base installation.") + log.error("To update npm please run:") + log.error("sudo port selfupdate && sudo port upgrade npm\n") + return cb() + } + // use the initial installation method (repo, tar, git) for updating if (url.parse(req).protocol) what = req npm.commands.install(where, what, cb)