📦🐈 Active development trunk for Yarn ⚒
BSD 2-Clause "Simplified" License
7.23k
stars
1.07k
forks
source link
[Bug?]: `ERR_REQUIRE_ESM` in Yarn PnP mode using Node.js 22 with `--experimental-require-module` flag #6336
Open
NMinhNguyen opened 2 weeks ago
Self-service
Describe the bug
ERR_REQUIRE_ESM
when requiring an ES module from CommonJS using Yarn PnP with Node.js 22 with--experimental-require-module
flag.To reproduce
https://codesandbox.io/p/devbox/nervous-leavitt-ndnn53
Environment
Additional context
Would expect this to work, thanks to https://github.com/nodejs/node/pull/51977.
Disabling Yarn PnP works: https://codesandbox.io/p/devbox/nervous-leavitt-forked-9mgdvt