diff --git a/lib/npm.js b/lib/npm.js index 907b1a8..0842210 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -254,7 +254,7 @@ NPMLocation.prototype = { // warn if using jspm-style dependencies at this point for (var d in pjson.dependencies) - if (!pjson.dependencies[d].match(/^(https?|git)[:+]/) && pjson.dependencies[d].indexOf(':') > 0) + if (!pjson.dependencies[d].match(/^(https?|git)[:+]|(.)[:\/]/)) throw 'Package.json dependency %' + d + '% set to `' + pjson.dependencies[d] + '`, which is not a valid dependency format for npm.' + '\nIt\'s advisable to publish jspm-style packages to GitHub or another `registry` so conventions are clear.'; + '\nTo skip npm compatibility install with %jspm install ' + packageName + '-o "{jspmNodeConversion: false}"%.'