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

Unable to import fontkit's package.json in dependent packages #287

Open
fstrube opened this issue Jul 20, 2022 · 0 comments · May be fixed by #288
Open

Unable to import fontkit's package.json in dependent packages #287

fstrube opened this issue Jul 20, 2022 · 0 comments · May be fixed by #288

Comments

@fstrube
Copy link
Contributor

fstrube commented Jul 20, 2022

Packages that depend on fontkit are no longer able to obtain version information and other metadata by importing fontkit's package.json. Previously, we were able to do something like this:

const fontkitVersion = require('fontkit/package.json').version;

// or

import fontkitPackage from 'fontkit/package.json' assert {type: 'json'};

const fontkitVersion = fontkitPackage.version;

Now, we receive an ERR_PACKAGE_PATH_NOT_EXPORTED error when attempting to import the package.json file.

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" 
fstrube added a commit to fstrube/fontkit that referenced this issue Jul 20, 2022
@fstrube fstrube linked a pull request Jul 20, 2022 that will close this issue
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