diff options
author | isaacs <i@izs.me> | 2010-08-24 22:38:49 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-08-25 16:21:49 +0400 |
commit | 6b79ac1843aff5f5fcc806e9d7388747dd8aebc2 (patch) | |
tree | 81ab8be4a004ec1ff002c6642beba038e213de74 | |
parent | 99a832a9b22c02edde6d38111c63e5fcd1221c60 (diff) |
Better messaging when the node version isn't supported
-rw-r--r-- | lib/install.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/install.js b/lib/install.js index 9f815e69b..e7b8d4a2b 100644 --- a/lib/install.js +++ b/lib/install.js @@ -162,8 +162,9 @@ function findSatisfying (pkg, name, range, mustHave, reg) { function finisher (pkg, reg, pkglist, cb) { return function (er, data) { if (er) return log.er(cb, "Error installing "+pkg)(er) - if (!data._nodeSupported) return cb(new Error( - data.name+"@"+data.version+" not compatible with node@"+process.version)) + if (!data._nodeSupported) cb(new Error( + data.name+"@"+data.version+" not compatible with node@"+process.version+"\n"+ + "Requires node@"+data.engines.node+"\n")) if (!reg.hasOwnProperty(data.name)) { reg[data.name] = Object.create(reg[data.name] || Object.prototype) @@ -194,6 +195,7 @@ function filterNodeVersion (data) { for (var v in data.versions) { if (!data.versions[v]._nodeSupported) { log.warn(data._id, "not supported on node@"+process.version) + log.warn(data.engines, data._id+" supported engines:") delete data.versions[v] } } |