Closed fhirter closed 10 months ago
Running your code gives no output. Can you add more context so it shows the error?
Running your code gives no output. Can you add more context so it shows the error?
updated the issue. Its run by jest test runner.
hope that helps replicating it.
no, that doesnt really help. I pushed a possible fix. Please try the current master version and report if it works
no, that doesnt really help. I pushed a possible fix. Please try the current master version and report if it works
I did your changes manually and the error was resolved.
But another error appears:
ReferenceError: TextDecoder is not defined
at node_modules/fontkit/dist/src/utils.js:28:29
This seems to be on fontkits side now. jest doesnt work great with esm modules. You might want to read trough https://jestjs.io/docs/ecmascript-modules
Im getting this building a React app in Vite. The master branch fixes the issue so the possible fix does work for build issues.
No matching export in "node_modules/fontkit/dist/browser-module.mjs" for import "openSync"
node_modules/svgdom/src/config.js:2:9:
2 │ import { openSync } from 'fontkit'
@mattsputnikdigital did you try current master? Please report back if it works
@Fuzzyma yes the master branch fixes the problem so you are good to include that fix in a new release.
nice. thanks for letting me know
released as 0.1.18
i am using svgdom to run tests using jest.
Until svgdom version 0.1.14 the following code was working. It is a test file run by jest (29.7.0):
node --experimental-vm-modules jest
In version 0.1.17. it fails with: