Skip to content

Updating to 2.31.0 will cause issues when deployed to Vercel #369

@ieedan

Description

@ieedan

Weirdly this works completely fine locally it's not until you deploy it that it causes issues.

Not sure exactly what the root of the issue is here but it comes from the bumped version of jsdom. Downgrading fixes it for me.

Here is the error I am getting:

Unhandled Rejection: Error [ERR_REQUIRE_ESM]: require() of ES Module /var/task/node_modules/.pnpm/[email protected]/node_modules/parse5/dist/index.js from /var/task/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/parser/html.js not supported.
Instead change the require of index.js in /var/task/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/parser/html.js to a dynamic import() which is available in all CommonJS modules.
    at /opt/rust/nodejs.js:2:13528
    at Function.Gr (/opt/rust/nodejs.js:2:13906)
    at Ue.e.<computed>.Be._load (/opt/rust/nodejs.js:2:13498)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions