-
Notifications
You must be signed in to change notification settings - Fork 437
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
Upgrade to Yarn v2 or switch back to npm #1074
Comments
@artlowel : Thanks for logging this. My inclination is to resolve this in either 7.1 or perhaps 7.0 final (after Beta 5 / Testathon) if we deem it higher priority. In terms of yarn vs npm, I don't have strong opinions right now (haven't dug enough). It seems like the main pro of For now, I'm going to move this into 7.1, as it looks like there has been no formal announcement of an End of Life date for Yarn v1 (or Yarn Classic), so there's no requirement for an upgrade soon. However, we definitely should monitor this and see if that message changes. |
@artlowel I am curious, why do you think this is the case? "switching to npm is likely more effort than upgrading to yarn 2." Shouldn't npm just work. If npm does not work, I feel there is something wrong. Find and replace of yarn to npm seems rather trivial. I feel the use of yarn should be a choice of the developer. |
I was thinking about things like resolutions that don't work in exactly the same way between the two, or changes to the CI build which has some code to deal with the yarn cache, updating the docs, … However if you say it's not that hard to support both npm and yarn, and let the user decide, I'm all for it. |
The argument to switch back to As an experiment I tried to switch to $ rm -rf node_modules
$ sed -i 's/yarn/npm/g' package.json
$ npm install The first problem was:
So If I force the installation it continues, but hits another error with a yarn-specific link syntax for local dependencies: $ npm install --legacy-peer-deps
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "link:": link:./lint/dist/src/rules/html
npm error A complete log of this run can be found in: /home/aorth/.npm/_logs/2024-07-08T10_08_29_847Z-debug-0.log It seems we should be able to use After fixing a few other minor issues like this the application builds and runs fine. I will submit a pull request. |
Yarn 2 was released last year, and yarn 1 will only get security upgrades anymore. I can't seem to find the date when those will end.
Yarn 2 isn't backwards compatible, but the migration process doesn't seem too daunting. More info here.
However we could also consider dropping yarn and going back to npm. The main reasons we switched back in 2017 have been addressed: npm now has built-in support for proper lockfiles, and its performance is supposedly on par with yarn 1. (however the yarn 2 docs promise major performance increases on top of that, even with the option to eliminate the install step altogether). Still, switching to npm is likely more effort than upgrading to yarn 2.
The text was updated successfully, but these errors were encountered: