yassine safraouiY
Convex Community2y ago
12 replies
yassine safraoui

Cannot use JSDOM in my convex backend

Hello, I'm building a side project with NextJS and convex, I'm trying to use jsdom and I always get this build error? after searching(https://github.com/evanw/esbuild/issues/1311) I found that it happens frequently with jsdom and that I normally I can solve it by adding jsdom it as an external package, when I searched(https://docs.convex.dev/functions/bundling?ref=news.convex.dev#specifying-external-packages) I found that I can do that by adding it to my convex.json, except that it doesn't work, I tried placing the convex.json in my project working dir and the convex dir but to no avail, should I change to use another package similar to JSDOM or what?
image.png
GitHub
I have a simple jsdom example program: const { JSDOM } = require("jsdom") const { document } = new JSDOM(<!DOCTYPE html><p>Hello world</p>).window document.createEleme...
Problem bundling simple jsdom example - request.resolve · Issue #13...
Bundling is the process of gathering, optimizing and transpiling the JS/TS
Bundling | Convex Developer Hub
Was this page helpful?