benzittlau / superjson-err-require-esm

A basic repo to reproduce superjson ERR_REQUIRE_ESM error

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue

Superjson throws an error on import:

Error [ERR_REQUIRE_ESM]: require() of ES Module <redacted>superjson-bug-repro/node_modules/superjson/dist/index.js from <redacted>/superjson-bug-repro/index.ts not supported.

See: blitz-js/superjson#268

Steps to reproduce

Install node LTS via n

n lts

Note: I've confirmed the bug with v18.18.2 as well as v20.10.0

Install dependencies via yarn:

yarn install

Run the entrypoint using ts-node via npx:

npx ts-node index.ts

About

A basic repo to reproduce superjson ERR_REQUIRE_ESM error


Languages

Language:TypeScript 100.0%