--- lib/update.js.orig 1985-10-26 08:15:00.000000000 +0000
+++ lib/update.js 2018-04-24 15:59:30.000000000 +0000
if (url.parse(ww.req).protocol) ww.what = ww.req
const where = (ww.dep.parent && ww.dep.parent.path) || ww.dep.path
- const isTransitive = !(ww.dep.requiredBy || []).some((p) => p.isTop)
- const key = where + ':' + String(isTransitive)
- if (!toInstall[key]) toInstall[key] = {where: where, opts: {saveOnlyLock: isTransitive}, what: []}
- if (toInstall[key].what.indexOf(ww.what) === -1) toInstall[key].what.push(ww.what)
+ if (ww.what.match(/^npm@/) && where.match(/@@NPM_PATH_JSREGEX@@/)) {
+ log.error("Trying to update '" + ww.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 npm6\n")
+ const isTransitive = !(ww.dep.requiredBy || []).some((p) => p.isTop)
+ const key = where + ':' + String(isTransitive)
+ if (!toInstall[key]) toInstall[key] = {where: where, opts: {saveOnlyLock: isTransitive}, what: []}
+ if (toInstall[key].what.indexOf(ww.what) === -1) toInstall[key].what.push(ww.what)
return Bluebird.each(Object.keys(toInstall), (key) => {
const deps = toInstall[key]