diff options
author | Rebecca Turner <me@re-becca.org> | 2015-10-10 02:13:51 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-10-16 02:19:45 +0300 |
commit | a332f618274f1673cbdcb1e3f1da07479052f178 (patch) | |
tree | 3354dbd27d3a8bd578f98dbc38dc6c0375c9aef5 /lib | |
parent | 4f503668227844a22dad6ef2a00f9f9d096b27e8 (diff) |
errors: Show available versions as lists instead of JSON
PR-URL: https://github.com/npm/npm/pull/9927
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cache/add-named.js | 2 | ||||
-rw-r--r-- | lib/fetch-package-metadata.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/cache/add-named.js b/lib/cache/add-named.js index 212ea7836..f0e5e2c33 100644 --- a/lib/cache/add-named.js +++ b/lib/cache/add-named.js @@ -285,7 +285,7 @@ function installTargetsError (requested, data) { requested = data.name + (requested ? "@'" + requested + "'" : '') targets = targets.length - ? 'Valid install targets:\n' + JSON.stringify(targets) + '\n' + ? 'Valid install targets:\n' + targets.join(', ') + '\n' : 'No valid targets found.\n' + 'Perhaps not compatible with your version of node?' diff --git a/lib/fetch-package-metadata.js b/lib/fetch-package-metadata.js index 4efc37806..336de7ef7 100644 --- a/lib/fetch-package-metadata.js +++ b/lib/fetch-package-metadata.js @@ -141,7 +141,7 @@ function fetchNamedPackageData (dep, next) { // And failing that, we error out var targets = versions.length - ? 'Valid install targets:\n' + JSON.stringify(versions) + '\n' + ? 'Valid install targets:\n' + versions.join(', ') + '\n' : 'No valid targets found.' var er = new Error('No compatible version found: ' + dep.raw + '\n' + targets) |