diff --git a/lib/install/inflate-shrinkwrap.js b/lib/install/inflate-shrinkwrap.js index 395cc11191309..c4b9aaadfa632 100644 --- a/lib/install/inflate-shrinkwrap.js +++ b/lib/install/inflate-shrinkwrap.js @@ -74,7 +74,9 @@ function quotemeta (str) { } function tarballToVersion (name, tb) { - const registry = quotemeta(npm.config.get('registry')) + var x = npm.config.get('registry') + if (x === null) x = '' + const registry = quotemeta(x) .replace(/https?:/, 'https?:') .replace(/([^/])$/, '$1/') let matchRegTarball