Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Throw logical error message when no package.json is found locally #2

Closed
dawsbot opened this issue Jan 5, 2017 · 1 comment
Closed

Comments

@dawsbot
Copy link
Contributor

dawsbot commented Jan 5, 2017

When there is no package.json locally:

Line 94 of package-tar.js should hold the answer. Check for existence of dependencies in the json object before accessing it.


$ instafork a

? Where do you want to get the source from? remote registry
remote registry

Stdout: a-2.1.0.tgz

Stdout:
/Users/dawsonbotsford/cli/instafork/dist/helpers/package-tar.js:149
var existingDeps = _readPkgUp2.default.sync({ cwd: process.cwd() }).pkg.dependencies;
^

TypeError: Cannot read property 'dependencies' of undefined
at packageTar.installDeps (/Users/dawsonbotsford/cli/instafork/dist/helpers/package-tar.js:149:78)
at /Users/dawsonbotsford/cli/instafork/dist/instafork.js:52:20
at /Users/dawsonbotsford/cli/instafork/dist/helpers/package-tar.js:117:9
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

@dawsbot
Copy link
Contributor Author

dawsbot commented Jan 14, 2017

Closed with 8c50463baa4071b3bc6de91ec8c714e09eb350c5

@dawsbot dawsbot closed this as completed Jan 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant