Skip to content
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

Type generation no longer works with yarn PnP since 0.2.7 #3196

Open
5 tasks done
jaredchamberlain opened this issue Nov 7, 2024 · 0 comments
Open
5 tasks done

Type generation no longer works with yarn PnP since 0.2.7 #3196

jaredchamberlain opened this issue Nov 7, 2024 · 0 comments

Comments

@jaredchamberlain
Copy link

jaredchamberlain commented Nov 7, 2024

Describe the bug

We are using the @module-federation/enhanced/webpack plugin with type generation in a project using yarn PnP. And starting with version 0.2.7 the type generation throws an error. The error message provides the command that fails in the format npx tsc --project path/to/config.json and this command will succeed when run as yarn tsc ... but fails to resolve dependencies when run with npx

When the yarn nodeLinker is set to use pnpm this is not an issue so that's why I believe it's a PnP compatibility issue

Reproduction

https://github.com/jaredchamberlain/mf-types-pnp

Used Package Manager

yarn

System Info

System:
    OS: macOS 14.7
    CPU: (12) arm64 Apple M3 Pro
    Memory: 590.66 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    Yarn: 4.4.0 - ~/.nvm/versions/node/v20.12.2/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.12.2 - ~/.nvm/versions/node/v20.12.2/bin/pnpm
  Browsers:
    Chrome: 130.0.6723.116
    Safari: 18.1

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant