diff --git a/lib/cmd/install.js b/lib/cmd/install.js index 81f0040a714..7ec01f80d97 100644 --- a/lib/cmd/install.js +++ b/lib/cmd/install.js @@ -26,6 +26,7 @@ function installCmd (input, flags) { return readPkgUp() .then(_ => { pkg = _ }) + .then(_ => _ || Promise.reject("there is no './package.json'")) .then(_ => updateContext(pkg.path)) .then(_ => install()) .then(_ => linkPeers(pkg, ctx.store, ctx.installs))