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

Error after updating from 1.9.3 -> 1.9.5: only yarn v2/v3 with nodeLinker: node-modules is supported at this time #4953

Closed
dobesv opened this issue May 15, 2023 · 6 comments · Fixed by #5009
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@dobesv
Copy link
Contributor

dobesv commented May 15, 2023

What version of Turborepo are you using?

1.9.5

What package manager are you using / does the bug impact?

Yarn v2/v3 (node_modules linker only)

What operating system are you using?

Linux

Describe the Bug

When upgrading 1.9.3 -> 1.9.5 it now prints an error:

Error: only yarn v2/v3 with `nodeLinker: node-modules` is supported at this time

We've been using turbo for many months now with Yarn PnP seemingly without problems, so it's surprising that it says this is not supported.

Expected Behavior

Keeps working as well as it did in version 1.9.3

To Reproduce

Probably need a yarn berry project that is not using the node-modules linker and compare the behavior between 1.9.3 and 1.9.5

Reproduction Repo

No response

@dobesv dobesv added area: turborepo kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels May 15, 2023
@flex-jonghyen
Copy link

flex-jonghyen commented May 16, 2023

It maybe relavent with #4655.

To maintainers: It's surprising and frustrating when a feature that's supported is suddenly discontinued without warning. Could you tell me when yarn pnp will be available to its users again?

@dobesv dobesv changed the title [turborepo] Error after updating from 1.9.3 -> 1.9.5: only yarn v2/v3 with nodeLinker: node-modules is supported at this time May 16, 2023
@dobesv
Copy link
Contributor Author

dobesv commented May 16, 2023

Could you tell me when yarn pnp will be available to its users again?

FWIW from what I can tell they have never "officially" supported yarn PnP. However, it has been working fine in Yarn PnP for us for some time, so I'm not sure what the blocker is.

@NicholasLYang
Copy link
Contributor

Hi, yeah it does seem that we accidentally permitted yarn PnP, when that was never the intention. We're currently investigating what precise features do not work well with PnP so we can restrict accordingly.

@psychobolt
Copy link

psychobolt commented May 17, 2023

My yarn PnP project was working fine until upgrading 1.9.4+.

Hi, yeah it does seem that we accidentally permitted yarn PnP, when that was never the intention. We're currently investigating what precise features do not work well with PnP so we can restrict accordingly.

@dobesv Seems like they are not even sure yet why it should be blocked, but did so.

@nathanhammond
Copy link
Contributor

There were multiple problems in the past that prevented us from working with yarn3 PnP. Over the past six or nine months we've worked through a lot of them as a side effect of work we were doing, but "supporting PnP" wasn't the primary goal of those efforts.

So, as it stands, we actually believe we support it, but have not written the tests that would confirm that.

The issue here is that we previously did not hard error in all scenarios with yarn PnP, which was a "bug" that we "fixed."

Your reports of it working increase our confidence that we just need to confirm everything with tests, so we're working on that!

@kodiakhq kodiakhq bot closed this as completed in #5009 May 18, 2023
kodiakhq bot pushed a commit that referenced this issue May 18, 2023
### Description

Fixes #4953

We had unintentionally dropped the PnP check in Go and reintroduced the
check in Rust. This PR simply removes this check and returns us to the
old unintentional behavior. I believe run should work as expected since
we execute all tasks via `yarn` which automatically does the right thing
with `.pnp.cjs`. (Also #4953 contains many reports of people using Yarn
PnP with turbo just fine)

This PR does not:
- Add support for PnP with prune. That check was never accidentally
dropped and I want to do a few more tests before enabling that.
- Fixup our examples to work correctly with Yarn PnP. All of the ones I
tried required adding some dependencies

Reviewer notes:
I apologize, but I ended up fixing all the clippy lints in the files I
touched and not just the ones introduced from the behavior change. This
resulted in the PR being larger than necessary.

### Testing Instructions

Existing unit tests around yarn/berry detection now pass without the a
`.yarnrc.yml` specifying `nodeLinker: node-modules`. Manual testing of
some test repos

Co-authored-by: Chris Olszewski <Chris Olszewski>
@nathanhammond
Copy link
Contributor

This is released in 1.9.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants