-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Error when exporting to SVG on node 18 #2037
Comments
I have the same problem, i've posted here: #634 (comment) |
I am seeing this issue as well. I had to upgrade to node 18 because AWS has officially deprecated Node 16 and now I can't create SVGs on my server. |
I run into same issue, yet I was able to actually run it correctly on Node 18 & Node 20. After digging down, reason for not working is buried inside: try {
jsdom = require('jsdom');
} catch(e) {
// Check the required module's name to see if it contains jsdom, and only
// complain about its lack if the module requires it.
if (/\bjsdom\b/.test(requireName)) {
throw new Error('Unable to load jsdom module.');
}
}
Issues persisted for me on Windows, when I used WSL to run my app it worked perfectly fine. So I started further experiments. What actually helped me on Windows was removing @KarelJanVanHaute @rfried @samubence if you might share whether this was the case for you, if so, maybe there is some issue with |
I'm using paper-jsdom-canvas to render a paperjs and then export it to an .svg. On the export I get the following error.
error - TypeError: Cannot read properties of undefined (reading 'createElementNS')
It used to work on node 14. But I need to upgrade to at least node 18.
The error is thrown at line 14652 in paper-full.js
There is this code:
So document seems to be undefined.
When I update jsdom to the latest version , that part seems to work, but then we get the following Error
But the canvas package is installed. Also to the latest version.
Expected result
To export to .svg
Additional information
macOS 13.4, Node v20.3.0
The text was updated successfully, but these errors were encountered: