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
Website documentation: preact/compat with Yarn PnP #1050
Comments
This feels like something they should support, I'm apprehensive about adding per-package manager instructions too, on top of the build tool selection. |
Thanks for transferring this issue to the correct project. I agree that ideally Yarn should support this (would've saved me some time and digging aside from anything else), and it's unfortunate it doesn't work out of the box. But I think this should be on the Preact compatibility page. Two reasons as to why:
|
I'd still say this is better addressed in a bug report to Yarn, but if you wanted to add a footnote to the aliasing in Node section for Yarn, I'd accept it. |
Describe the bug
When running a Node script, which imports react-query and has preact in the same project, through Yarn 3.6.3 with PnP enabled, I get this error:
Adding the recommendation from the Preact compat "Aliasing in Node" section didn't help, however after doing some digging I found this thread: yarnpkg/berry#1621
Suffixing with dependencies with
@*
worked and I was ableTo Reproduce
Steps to reproduce the behavior:
yarn create
to start a new project, andyarn set version stable
to set it to the latest stable yarn (with PnP enabled)yarn add preact @tanstack/react-query
tsx
.react
not being provided.Expected behavior
Expected/suggested: add to https://preactjs.com/guide/v10/getting-started#aliasing-react-to-preact) a note, e.g.:
If using Yarn PnP, suffix
@*
on the dependency versions, i.e.:The text was updated successfully, but these errors were encountered: