diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install/deps.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/install/deps.js b/lib/install/deps.js index ec50b1421..e213734a6 100644 --- a/lib/install/deps.js +++ b/lib/install/deps.js @@ -625,7 +625,10 @@ var validatePeerDeps = exports.validatePeerDeps = function (tree, onInvalid) { if (!tree.package.peerDependencies) return Object.keys(tree.package.peerDependencies).forEach(function (pkgname) { var version = tree.package.peerDependencies[pkgname] - var match = findRequirement(tree.parent || tree, pkgname, npa.resolve(pkgname, version)) + try { + var spec = npa.resolve(pkgname, version) + } catch (e) {} + var match = spec && findRequirement(tree.parent || tree, pkgname, spec) if (!match) onInvalid(tree, pkgname, version) }) } |