4 ms·
After the Yarn 2 debacle, I've been using Yarn 1 (as well as most people who use Yarn that I know). I briefly tried Yarn 3 but it also did some weird things.
by gavinray 3y ago
After the Yarn 2 debacle, I've been using Yarn 1 (as well as most people who use Yarn that I know).
I briefly tried Yarn 3 but it also did some weird things.
Here's to hoping that Yarn 4 "just works" the way Yarn 1 does.
- moomoo11 3y agoSame. I was using yarn 1 until a couple years ago. Now I just use npm. What are the downsides? I have no idea. If there are, they must be negligible because the apps work fine, customers are happy, and devs are able to keep building. We must not have any crazy dependencies because I don’t see much performance gains. At most we might link other packages as we develop. I think if I really went searching for problems I might find something. I also just try to avoid JS these days unless it’s UI, and there I keep things very lean and straightforward.
- porridgeraisin 3y agoThat's the thing with tools like this. Eventually whoever you one-upped just incorporates your features and now they have the edge again - your new features and their greater experience.
- gavinray 3y agoThe sole reason I haven't migrated to NPM to be honest is the lack of a replacement for "yarn run". I use "yarn run" incredibly frequently, for things like "yarn run nodemon" and "yarn run tsc" or other executable packages that are local dependencies.
- hoten 3y agoHave you tried npx? It comes with Node. There's also npm run, but perhaps I'm missing something about how they differ
- gavinray 3y agonpx doesn't run project-installed packages, it uses global downloads The "npm run" is a command for running defined scripts in your package.json The equivalent of "npm run" in yarn is just "yarn", for example: "yarn start"/"yarn dev". What "yarn run" does is allow you to run binaries installed from "dependencies"/"devDependencies". Say that I run the following: yarn install --dev nodemon ts-node typescript I can then run yarn run tsc --init / yarn run nodemon / yarn run ts-node And it will invoke the local "./node_modules" package binaries. This is useful when you want to ensure version-locked, per-project binaries.
- hoten 3y ago`npx <package>` does run project installed binaries, if they exist (node_modules/.bin/<package>). In that scenario it's equivalent to `yarn <package>`. Otherwise yes it falls back to a global package, and a prompt to install if missing.
- addicted 3y agonpx has supported local packages for quite some time at this point.
- apineda 3y agoSame situation. I use npm on most of my newer projects and yarn on one project where I tried to upgrade it to 2 but it was pure disaster.