We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Error code when importing directory in Node.js is ERR_UNSUPPORTED_DIR_IMPORT. But in Yarn PnP+ESM it's ERR_MODULE_NOT_FOUND.
ERR_UNSUPPORTED_DIR_IMPORT
ERR_MODULE_NOT_FOUND
This is causing import error for custom loader as in privatenumber/tsx#439
package.json
{ "type": "module" }
dir/index.js
export {};
index.js
try { const a = await import('./dir'); console.log(a); } catch ({ code }) { console.log(code); // node: `ERR_UNSUPPORTED_DIR_IMPORT` // yarn-pnp-esm: `ERR_MODULE_NOT_FOUND` }
System: OS: Windows 11 10.0.22631 CPU: (16) x64 AMD Ryzen 7 6800H with Radeon Graphics Binaries: Node: 20.11.0 - D:\Temp\AppData\xfs-e4b9d728\node.CMD Yarn: 4.2.2 - D:\Temp\AppData\xfs-e4b9d728\yarn.CMD npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Self-service
Describe the bug
Error code when importing directory in Node.js is
ERR_UNSUPPORTED_DIR_IMPORT
.But in Yarn PnP+ESM it's
ERR_MODULE_NOT_FOUND
.This is causing import error for custom loader as in privatenumber/tsx#439
To reproduce
package.json
dir/index.js
index.js
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: