Skip to content

Improve error message when unable to locate a package #6

Closed
@matthewp

Description

@matthewp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions