-
-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Node 19 + ESM + PNP] ERR_MODULE_NOT_FOUND #1972
Comments
@cspotcode should I think that initial post of #1007 should be updated with PnP case. |
Yarn PNP has not supported ESM. There are some temporary solutions:
After any modification above, run |
Search Terms
I'm starting a new project with yarn berry (Plug'n'Play enabled) and using ESM to test Node 19 features.
Expected Behavior
No ERR_MODULE_NOT_FOUND error
Actual Behavior
Steps to reproduce the problem
yarn init -y
yarn set version canary
yarn add undici typescript ts-node @types/node
"type": "module"
nodeLinker: pnp
(optional/useless step, Plug'n'Play is already enabled by default)tsconfig.json
file:example.ts
fileyarn ts-node example.ts
Minimal reproduction
https://github.com/rtritto/ts-node-repros/tree/test-pnp-node
Specifications
ts-node version: 10.9.1
node version: 19.8.1
TypeScript version: 5.0.2
package.json:
Windows
No
nodeLinker: node-modules
The text was updated successfully, but these errors were encountered: