Skip to content

esbuild causes import errors with adapter-node #6440

@AlexRMU

Description

@AlexRMU

Describe the bug

Same issue as #2400

After #6372, I get:

var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
    get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function (x) {
    if (typeof require !== "undefined")
        return require.apply(this, arguments);
    throw new Error('Dynamic require of "' + x + '" is not supported');
});

...

var crypto_1 = __importDefault(__require("crypto"));

Perhaps the problem is evanw/esbuild#1921

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-sczcqj?file=README.md

Logs

No response

System Info

any

Severity

blocking all usage of SvelteKit

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1-importantSvelteKit cannot be used by a large number of people, basic functionality is missing, etc.pkg:adapter-node

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions