Skip to content

Error [ERR_REQUIRE_ESM]: require() of ES Module #48

@Gradlon

Description

@Gradlon

Superjson repo updated the codebase recently and changed.

The error was,

api:start:dev: const superjson = require('superjson');
api:start:dev:                   ^
api:start:dev: Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/gradlon/Desktop/fad-stack/node_modules/superjson/dist/index.js from /Users/gradlon/Desktop/fad-stack/node_modules/@soundxyz/redis-pubsub/dist/index.js not supported.
api:start:dev: Instead change the require of /Users/gradlon/Desktop/fad-stack/node_modules/superjson/dist/index.js in /Users/gradlon/Desktop/fad-stack/node_modules/@soundxyz/redis-pubsub/dist/index.js to a dynamic import() which is available in all CommonJS modules.

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