Been using Yarn 2 for several months now. PnP is fine except when 3rd party projects have stuff like references to node_modules hard-coded in their distributable. I don't see a workaround to this, and a HUGE chunk of 3rd party libraries do this. I'm going back to Yarn 1 or even NPM (if work on Yarn 1 halts).
Yarn 1 was cool, and moved NPM to get their act together a bit, but I hate when maintainers just assume the rest of the ecosystem will migrate with them. This is why Python 3 took a decade to be adopted, and that adoption only happened because people were absolutely forced to use Python whereas switching back to NPM is a breeze.
Almost every single day, for months, I've ran into problems with PnP...
You can enable the node_modules just fine if that's what you prefer.
From my experience, very few 3rd-party libraries actually hardcode the n_m folder anymore, and I found them relatively easy to ignore (RN being the main contender). If large projects like Next or Gatsby manage to make things work without trouble, there's really no reason in 2021 for projects to still misslist their dependencies.
You can enable the node_modules just fine if that's what you prefer.
You're referring to nodeLinker? Doesn't that just disable PnP project-wide? In which case, why use Yarn 2+ at all?
I agree it'd be nice if every maintainer fixed their projects to not reference n_m, but that's just not the reality of the Node ecosystem... github.com/search?q=%22node_module...
Yesterday my use case was trying to use Playwright (30k Stars, hundreds of thousands of downloads every week) with Yarn PnP. Nope.
Had to do a bunch of weird unplugged binaries things from the start (revolving around bcrypt and @apollo/protobufjs).
I dunno man. I don't want to dog the project and I really appreciated what Yarn 1 did, and the goals of Yarn 2, but someone needs to say "Look, I've used this thing for several months on a decent sized project and it's painful. Every few days I run into something. I wish I would've just used Yarn 1" so others know what they're getting themselves into.
Until there is a really straightforward dev-friendly way to say "Okay, this package is fine if it's a zip and this package is probably never going to work with Yarn 2 and would just be easier to plop into node_modules" people are just going to keep jumping ship back to npm.
What dev wants to have to study a ton of docs and do a bunch of workarounds to be able to use a package manager that used to be as simple as yarn add foo?
It's just hard, whereas Yarn 1 wasn't, and npm isn't, and npm has workspaces now. 🤷♂️
A developer with M.Sc. in Computer Science. Working professionally since 2010. In my free time I make music and cook.
Also I don't and after the recent events will not have Twitter.
Location
Budapest
Education
Eötvös Loránd University (ELTE - Budapest Hungary) Computer Science M. Sc.
I encountered this opinion today as I was wondering if we should move away from yarn 1 finally. Either to a now magically working yarn 2+ or just back to npm which never stopped working.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Been using Yarn 2 for several months now. PnP is fine except when 3rd party projects have stuff like references to node_modules hard-coded in their distributable. I don't see a workaround to this, and a HUGE chunk of 3rd party libraries do this. I'm going back to Yarn 1 or even NPM (if work on Yarn 1 halts).
Yarn 1 was cool, and moved NPM to get their act together a bit, but I hate when maintainers just assume the rest of the ecosystem will migrate with them. This is why Python 3 took a decade to be adopted, and that adoption only happened because people were absolutely forced to use Python whereas switching back to NPM is a breeze.
Almost every single day, for months, I've ran into problems with PnP...
You can enable the
node_modules
just fine if that's what you prefer.From my experience, very few 3rd-party libraries actually hardcode the n_m folder anymore, and I found them relatively easy to ignore (RN being the main contender). If large projects like Next or Gatsby manage to make things work without trouble, there's really no reason in 2021 for projects to still misslist their dependencies.
You're referring to
nodeLinker
? Doesn't that just disable PnP project-wide? In which case, why use Yarn 2+ at all?I agree it'd be nice if every maintainer fixed their projects to not reference n_m, but that's just not the reality of the Node ecosystem... github.com/search?q=%22node_module...
Yesterday my use case was trying to use Playwright (30k Stars, hundreds of thousands of downloads every week) with Yarn PnP. Nope.
The maintainer literally said "Wait what version of Yarn?" I said "2.4.2", he said "Ah yarn 2 my old enemy" github.com/microsoft/playwright/se...
@apollo/protobufjs
).I dunno man. I don't want to dog the project and I really appreciated what Yarn 1 did, and the goals of Yarn 2, but someone needs to say "Look, I've used this thing for several months on a decent sized project and it's painful. Every few days I run into something. I wish I would've just used Yarn 1" so others know what they're getting themselves into.
I'm not the only one with this opinion news.ycombinator.com/item?id=28122318
Until there is a really straightforward dev-friendly way to say "Okay, this package is fine if it's a zip and this package is probably never going to work with Yarn 2 and would just be easier to plop into
node_modules
" people are just going to keep jumping ship back to npm.What dev wants to have to study a ton of docs and do a bunch of workarounds to be able to use a package manager that used to be as simple as
yarn add foo
?It's just hard, whereas Yarn 1 wasn't, and npm isn't, and npm has workspaces now. 🤷♂️
I encountered this opinion today as I was wondering if we should move away from yarn 1 finally. Either to a now magically working yarn 2+ or just back to
npm
which never stopped working.