I Finally Changed Package Managers

preview_player
Показать описание
Have you tried pnpm out yet? Are you also still on npm? I was late and that's okay, did you beat me to it?

S/O Ph4seOne for the awesome edit 🙏
Рекомендации по теме
Комментарии
Автор

0:49 NPM isn’t slow, it just gives you time to make a drink, have a shower, go for a run, get much needed 12hr sleep. It’s a feature for larger projects 😅

szmr
Автор

I like how React projects have so many dependencies that instead of solving that problem with common patterns and packages combined they decided to build a fast dependency installer.

JTWebMan
Автор

pnpm is goated for monorepos - Anything else results in you accidentally using dependencies installed in one package that aren't installed in another

RhysSullivan
Автор

I don't know why, but I tried it a while ago and for some reason, typing "pnpm" gave me some kind of keyboard dyslexia and I would always end up typing some other permutation of those letters. Lol.

toastrecon
Автор

You should have shown the node_modules folder! With pnpm all the sub dependencies hidden in a subfolder. So when you open node_modules you will just the dependencies defined in your package.json (plus a few extra folders)

kabo
Автор

Super weird to see pnpm succeeding. I started using it in 2018. I even filed an issue because it originally didn't work for AngularJS at all. I tried to get others in the company to start using it (i'm not a frontend dev, npm really just sucks when you have all the nice tools the backend has), but no one wanted to. It's great to finally see it succeeding. At my current company I think several teams are using it!

snowe..
Автор

We used pnpm in production on a monorepo and it caused all kinds of issues with dependencies, using incorrect versions and leading to high memory usage. We now swapped it for yarn again and all out issues disappeared.

jakeherper
Автор

Conflicts in lockfiles is a huge issue. I am happy to hear in your case the pnpm lockfile had less conflicts than the alternatives. We did work a lot on minimising the amount of lockfile conflicts. Unfortunately, there is no way to completely avoid conflicts. We have some experimental settings for creating lockfiles with different names on branches. The idea is that once the branch is merged, a job merges the lockfiles and commits the updated "pnpm-lock.yaml" to the main branch, avoiding conflicts altogether.

zkochan
Автор

Really glad that PNPM is catching on more and more. I made a pull request a few months ago to add PNPM support to replit/upm and I'm so glad I did that - just so that more people can be introduced to PNPM.

DillonB
Автор

dude, you frickin rock! i just had a seemingly unsolvable dependency issue in a prod application, saw this video, tried pnpm, and it just magically started working again. what a g!

merveillevaneck
Автор

I definitely enjoy seeing the count of reused packages when I install a new package. Only problem is using npm for work and then accidentally doing npm i for a personal project then panic ctrl+c when I forget to use pnpm

asdougl
Автор

A colleague of mine told me about it a few years ago, and once I tried it I never looked back.
The biggest thing for me, that you didn't mention in this video, was workspaces! It makes setting up monorepos is super-easy.

volimsir
Автор

symlink has been a hard issue with pnpm, esp on react native, i think everyone should give yarn v3 a try, it's on par in comparision with pnpm

mateh
Автор

I like pnpm but it does have its shortfalls due to its module linking and hoisting strategy. We've stuck with yarn for our monorepo, which also includes React Native projects and native node modules. I've tried to move to pnpm, but it's more hassle since you're forced to opt-out of the optimizations that it provides by changing the linking strategy, and so you might as well just use traditional NPM.

For personal projects or JS/TS only repos, I've always use pnpm where possible.

dealloc
Автор

The biggest advantage of pnpm is that it improves installation speed and saves huge storage space. I have been using it by default for four years.

butterfly
Автор

pnpm scares me, we had a memory leak with a monorepo every time it recompiled it was creating a bigger memory footprint and taking longer to build. npm/yarn worked fine never knew what was causing it with pnpm.

joshbedo
Автор

pnpm is a necessity on smaller hard drives / ssds like on a laptop/macbook

samuelgunter
Автор

yarn lock is also yaml and human readable, and with yarn berry the install time is zero because you can commit gz and the yarn binary :D

stagfoo
Автор

Pnpm's really great features: 1. no freeloading on some other package's dependency. 2. It supports package.yaml ! This allows me to comment my why the dependencies are there, or why specific versions are specified the way they are, and also it is much much easier to read. 3. no need for pnpm run x, if it is the name of a script just pnpm x. 4. Tacking on extra arguments to a script: `pnpm scriptname a b c` will tack a b c onto the end of the command line for the script. 5. Probably best-in-class workspace support.

tesilab
Автор

Wowww!

This is the first time I've ever needed to slow down ⏬⏬⏬ a video instead of speeding it up ⏩⏩to 1.25x or 1.5x like I usually do. To be clear, I mean this as a compliment - your rapid-fire delivery packs so much valuable information into such a short time, all while maintaining perfect clarity. I'm impressed. Keep up the fantastic work!

NDYROCK