Skip to content

bug: Error [ERR_REQUIRE_ESM]: require() #2937

@niyonx

Description

@niyonx

Provide environment information

I'm getting this error in all my trigger tasks ever since 4.3.3 update.

Describe the bug

Error [ERR_REQUIRE_ESM]: require() of ES Module /var/task/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/index.js from /var/task/node_modules/.pnpm/@trigger.dev+core@4.3.3_typescript@5.0.4/node_modules/@trigger.dev/core/dist/commonjs/v3/imports/superjson.js not supported.
Instead change the require of index.js in /var/task/node_modules/.pnpm/@trigger.dev+core@4.3.3_typescript@5.0.4/node_modules/@trigger.dev/core/dist/commonjs/v3/imports/superjson.js to a dynamic import() which is available in all CommonJS modules.
    at /opt/rust/nodejs.js:2:13531
    at Function.un (/opt/rust/nodejs.js:2:13909)
    at Ye.e.<computed>.Je._load (/opt/rust/nodejs.js:2:13501)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14) {
  code: 'ERR_REQUIRE_ESM',
  page: '/abc/def'
}

Reproduction repo

n/a

To reproduce

Update NextJS project to 4.3.3

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions