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

Issue in migrating from 1.8.0 to 2.0.0 #292

Open
tbasim opened this issue Aug 1, 2022 · 1 comment
Open

Issue in migrating from 1.8.0 to 2.0.0 #292

tbasim opened this issue Aug 1, 2022 · 1 comment

Comments

@tbasim
Copy link

tbasim commented Aug 1, 2022

I recently upgraded Fontkit from 1.8.0 to 2.0.2. Post the upgrade my app fails to load with the following error:

Uncaught RangeError: Array buffer allocation failed
    at new ArrayBuffer (<anonymous>)
    at new Uint8Array (<anonymous>)
    at new UnicodeTrie (index.js:87:1)
    at Object.<anonymous> (browser.cjs:7530:1)
    at Object.<anonymous> (browser.cjs:13344:1)
    at 1081.@swc/helpers/lib/_define_property.js (browser.cjs:13344:1)
    at o (_prelude.js:1:1)
    at _prelude.js:1:1
    at Object.<anonymous> (FontManager.js:2:1)

Node version: v14.17.6
Import statement: import fontkit from 'fontkit';

Is there something I am missing here?

image

@Pomax
Copy link
Contributor

Pomax commented Aug 2, 2022

Does it work with v16 (the current active LTS)? The behaviour of Buffer changed over the last few major versions so it's possible the new release relies on something that only works in 16 and up. If so, the package.json will probably need an engines section added to make sure older Node users get a warning.

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