-
-
Notifications
You must be signed in to change notification settings - Fork 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
Cannot install JSDOM with Kit #7026
Comments
I don't think this is a kit problem. If If this is the case, since you're on mac, you either need to brew install pkg-config cairo pango libpng jpeg giflib librsvg pixman or xcode-select --install |
Closing as it's unlikely this originates from SvelteKit. I'm hoping the comment above resolves your issue, but if it doesn't then please see https://github.com/sveltejs/kit#bug-reporting for details on reporting to Vite |
@sea-grass @benmccann As I mentioned above, I can install and use it no problem with a plain Vite app ( |
@danawoodman Your issue is reproducible in a vite template that uses ssr ( |
Ah, good to know. I'll submit an issue to Vite, thanks 🙏 |
FYI someone having the same issue as you #7045 already did vitejs/vite#10255 |
Describe the bug
I am attempting to add JSDOM to a Kit app in order to do some simple web scraping in one of my routes. JSDOM fails with the following errors when attempting to import:
Installing canvas gets me:
I've attempted alternatives to JSDOM like happy-dom and linkedom but neither can handle the HTML I'm scraping.
I created a repro with Vanilla Vite using their generator and importing JSDOM works fine, so I am assuming this has something to do with Kit?
Here is the relevant line in my repro.
Reproduction
https://github.com/danawoodman/sveltekit-jsdom-repro
Logs
System Info
Severity
blocking all usage of SvelteKit
Additional Information
I've attempting a pretty exhaustive search but cannot find any bugs related to this on Vite or JSDOM and since it works with Node and Vite alone, I'm assuming this is a Kit bug
The text was updated successfully, but these errors were encountered: