--- lib/update.js.orig	2017-11-27 19:37:39.000000000 -0800
+++ lib/update.js	2018-01-09 17:01:45.000000000 -0800
@@ -58,10 +58,17 @@
       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 npm\n")
+      } else {
+        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]