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

Improve error message when unable to locate a package #6

Closed
matthewp opened this issue Jun 4, 2019 · 0 comments · Fixed by #7
Closed

Improve error message when unable to locate a package #6

matthewp opened this issue Jun 4, 2019 · 0 comments · Fixed by #7

Comments

@matthewp
Copy link
Member

matthewp commented Jun 4, 2019

Currently the logic expects to basically always be able to find a package:

var pkgPath = path.join(path.dirname(this.src.path), line.replace("@package", "").trim());
var pkg = fs.readFileSync(pkgPath).toString();

When for some reason the file doesn't exist it will throw on the fs.readFileSync call and not provide much to help figure out the problem.

We should try/catch this code and provide a better error message.

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

Successfully merging a pull request may close this issue.

1 participant