Skip to content

'require() of ES not supported Module' in 2.1.0 #20

Description

@Thegaram

I have @web-std/fetch as a sub-dependency. Starting yesterday I started having this issue during build. Downgrading to @web-std/fetch@2.0.3 resolves this.

[path]/node_modules/ts-node/dist/index.js:729
            return old(m, filename);
                   ^
Error [ERR_REQUIRE_ESM]: require() of ES Module [path]/node_modules/@ssttevee/multipart-parser/lib/index.js from [path]/node_modules/@web-std/fetch/dist/index.cjs not supported.
Instead change the require of index.js in [path]/node_modules/@web-std/fetch/dist/index.cjs to a dynamic import() which is available in all CommonJS modules.
    at Object.require.extensions.<computed> [as .js] ([path]/node_modules/ts-node/dist/index.js:729:20)
    at Object.<anonymous> ([path]/node_modules/@web-std/fetch/dist/index.cjs:14:25)
    at Object.require.extensions.<computed> [as .js] ([path]/node_modules/ts-node/dist/index.js:729:20)
    at Object.<anonymous> ([path]/node_modules/nft.storage/dist/src/token.cjs:5:1)
    at Object.require.extensions.<computed> [as .js] ([path]/node_modules/ts-node/dist/index.js:729:20)
    at Object.<anonymous> ([path]/node_modules/nft.storage/dist/src/lib.cjs:8:13)
    at Object.require.extensions.<computed> [as .js] ([path]/node_modules/ts-node/dist/index.js:729:20)
    at Object.<anonymous> ([path]/src/services/ipfs.ts:28:23)
    at Module.m._compile ([path]/node_modules/ts-node/dist/index.js:735:29)
    at Object.require.extensions.<computed> [as .ts] ([path]/node_modules/ts-node/dist/index.js:737:16)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions