--- lib/update.js.orig +++ lib/update.js @@ -51,7 +51,12 @@ if (url.parse(ww.req).protocol) ww.what = ww.req var where = ww.dep.parent && ww.dep.parent.path || ww.dep.path - if (toInstall[where]) { + if (ww.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") + } else if (toInstall[where]) { toInstall[where].push(ww.what) } else { toInstall[where] = [ww.what]