Skip to content

Fix the package.json reading so the list and terminal packages can be used again #3034

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matt-oakes
Copy link

Fixes #2972.

This PR fixes the reading of the package.json for the @serialport/list and @serialport/terminal packages.

The issue was that is was attempting to read one level up from the current working directory, rather than from the location of the javascript file. This was causing it to not be able to find the file, or find the wrong file.

The fix is to use __dirname to get the full path to the javascript files location so we can construct a full path to the package.json file to read it.

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

Successfully merging this pull request may close these issues.

@serialport/list, @serialport/terminal requires 'package.json' to run
1 participant