yarnpkg/berry

[Bug?]: chain loader

loynoir opened this issue · 2 comments

Self-service

  • I'd be willing to implement a fix

Describe the bug

ENOTDIR when using tsx under

  • node:18.7.0 which support chaining loader
  • yarn pnp

https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2022-07-13-version-1860-current-targos

nodejs/node#42623

To reproduce

$ yarn tsx foobar.ts
node:fs:1596
  handleErrorFromBinding(ctx);
  ^

Error: ENOTDIR: not a directory, stat '/app/.yarn/cache/tsx-npm-3.8.0-0fd68bdcc5-2990425ad0.zip/node_modules/tsx/dist/loader.js'
  errno: -20,
  syscall: 'stat',
  code: 'ENOTDIR',
  path: '/app/.yarn/cache/tsx-npm-3.8.0-0fd68bdcc5-2990425ad0.zip/node_modules/tsx/dist/loader.js'
}

Node.js v18.7.0

Environment

Node.js v18.7.0

Additional context

No response

Chained loaders aren't complete yet - still missing nodejs/node#43772 or similar.