Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependent package errors should be more actionable #204

Closed
mikrostew opened this issue Nov 28, 2018 · 1 comment
Closed

Dependent package errors should be more actionable #204

mikrostew opened this issue Nov 28, 2018 · 1 comment

Comments

@mikrostew
Copy link
Contributor

Repro

When running a package binary, if node_modules doesn't exist, or if one of the dependencies is missing (or at least the package.json is missing) you get this error:

$ ember serve
Notion error: Could not read dependent package info: Could not read package info: No such file or directory (os error 2)

But that doesn't tell the user what the actual problem is, or what to do about it.

Improvements

I think we can do a couple things better for this:

  1. If dependencies are not installed at all (no node_modules folder), tell the user to install dependencies
  2. If reading some dependency fails, provide info about which dependency failed (i.e. the path)
@charlespierce
Copy link
Contributor

I believe this is actually fixed. First, we don't read dependency package.json files any more at all, and second, if node_modules isn't there when we try to run a binary (e.g. ember), we will show:

Volta error: Could not execute `/home/user/project/node_modules/.bin/ember`, the file does not exist.

Please ensure that all project dependencies are installed with `npm install` or `yarn install`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants