Why I Switched From NPM/Yarn to PNPM And Why You Should Too!

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ต.ค. 2024

ความคิดเห็น • 150

  • @CoderOne
    @CoderOne  2 ปีที่แล้ว +19

    I would like to appreciate the help provided by the Creator of PNPM ​ @Zoltan Kochan

    • @testtest3080
      @testtest3080 2 ปีที่แล้ว

      Does not work in my country

    • @somerandomchannel382
      @somerandomchannel382 2 ปีที่แล้ว +1

      how to install missing peer dependencies? pnpm config set auto-install-peers true

    • @serge4349
      @serge4349 ปีที่แล้ว +1

      Thanks for the video, your pnpm install was not fresh (first run), it seems like you have already run it before and haven't cleared the store. You can see at 12:57, pnpm reused 1667 packages, and downloaded 0. No way it would download that many packages in 11seconds.

  • @maxreuv
    @maxreuv 2 ปีที่แล้ว +4

    The title and opening lines made me skeptical at first but I am glad I watched until the end! Turned out a very useful and well delivered video. Thank you!

  • @TannerBarcelos
    @TannerBarcelos 2 ปีที่แล้ว +3

    Loving pnpm so far. Going to start learning more about it and specifically "Workspaces". I have had no use for Workspaces to this point, but I am about to take off on a new project that is a perfect use case for Workspaces and all of pnpm's features.

  • @i3looi2
    @i3looi2 2 ปีที่แล้ว +41

    what i really care the most is the minified folder structure...
    it happens so often for VScode to open my node_modules and and endless scroll >_

    • @pavelzinchenko952
      @pavelzinchenko952 2 ปีที่แล้ว +11

      You can hide node_modules folder in /.vscode/settings.json file. Also, if you open any file in this folder, only this file will be shown in the file tree.

    • @i3looi2
      @i3looi2 2 ปีที่แล้ว +1

      @@pavelzinchenko952 thankyou , kind sir

    • @vpetryniak
      @vpetryniak 2 ปีที่แล้ว

      Yep, for me too

    • @vpetryniak
      @vpetryniak 2 ปีที่แล้ว +1

      @@pavelzinchenko952 thank you.

    • @fvlady94
      @fvlady94 2 ปีที่แล้ว +1

      Just press Ctrl/Cmd + 0 and then hold ArrowLeft

  • @despertaweb4793
    @despertaweb4793 2 ปีที่แล้ว +1

    Mindblowing! Thanks for the visibility! I'll go with pnpm!

  • @Cogneter
    @Cogneter 2 ปีที่แล้ว +10

    So just when I was almost sold and tried going to the pnpm site to check it out, I found out that the creator blocks all access from Russia (note: I do not support war).
    Guess I'll be sticking with good old npm.

    • @Brawaru
      @Brawaru 2 ปีที่แล้ว +1

      Gladly it doesn't wipe out the whole hard drive by replacing all files with hearts ... :\

  • @oliverhughes169
    @oliverhughes169 2 ปีที่แล้ว +12

    Good video. In the last example, it would have been good to compare the node_modules folder size between the three package managers as well. It is great that it is faster, but sometimes the size of the node_modules is an issue. It would be interesting to see how much of a space reduction PNPM achieves with the symlinking.

    • @thekwoka4707
      @thekwoka4707 2 ปีที่แล้ว

      The symlinking is only more space beneficial as you have multiple projects using the same dependencies.

    • @oliverhughes169
      @oliverhughes169 2 ปีที่แล้ว

      @@thekwoka4707 yes exactly. He covered this in the video. Rather than copying the same dependencies, they are symlinked which saves disk I/O (hence the performance boost) and space.

  • @yahyasalimi3254
    @yahyasalimi3254 2 ปีที่แล้ว +1

    Wow, did'nt know it existed. Thank you for this awesome video. You earned a subscriber today

  • @gideonmaxmerling204
    @gideonmaxmerling204 2 ปีที่แล้ว +38

    the explanation makes no sense, how does it solve the problem of having multiple copies of the same package with different versions, the symlinking thing only changes how packages can be accessed.

    • @zkochan
      @zkochan 2 ปีที่แล้ว +8

      By using a content addressable store. All files are hard linked (or cloned) to node_modules from a single place on the disk.

    • @thekwoka4707
      @thekwoka4707 2 ปีที่แล้ว +9

      It doesn't solve the one of different versions. But it does mean you don't need a bunch of the same version.

    • @Juan.Irizar
      @Juan.Irizar 2 ปีที่แล้ว +7

      I have no preferences over package managers, npm is builtin and I use that, I don't spend my day doing npm installs to see how u save 10 seconds.

    • @airplanegobrr
      @airplanegobrr 2 ปีที่แล้ว +1

      @@Juan.Irizar but it was 2 minutes saved..???

    • @airplanegobrr
      @airplanegobrr 2 ปีที่แล้ว +1

      Also I want to add after trying pnpm I would like to say that it's not actually that good at all it's slower than npm A LOT slower.
      But I do like the whole global node modules concept that part is really cool to me

  • @JamesQQuick
    @JamesQQuick หลายเดือนก่อน

    Great overview!

    • @CoderOne
      @CoderOne  หลายเดือนก่อน

      Thank you James!

  • @user-wc1sm8cj8s
    @user-wc1sm8cj8s 2 ปีที่แล้ว

    I once saw pnpm used by a dude on youtube, and I was like "what the heck is pnpm?", so I searched about it, tried it, and fell in love with it.
    It's almost a year now since I switched to pnpm😉 And I'm loving it🤘

  • @bob84409
    @bob84409 2 ปีที่แล้ว +9

    The last benchmark seems a bit off to me. Npm and yarn were executed without lock files and pnpm was executed with the lock file present, based on what I can see the file tree.

    • @_checkit
      @_checkit 2 ปีที่แล้ว +3

      You're part of the 1%! Those who go beyond the headline.

    • @_checkit
      @_checkit 2 ปีที่แล้ว +1

      And think that they use this video on the home page of the pnpm website 😁. I mean it's still very fast, but keep it real, not with cutting corners to make it look faster than it is.

    • @ticua07
      @ticua07 2 ปีที่แล้ว

      @@_checkit Yeah, but pnpm is not just about the performance it's about space saving too. If you have a lot of projects made with npm/yarn, try to run npkill it's a tool that shows how much space you are using with all the node_modules directories you have!

  • @joshuaberrios
    @joshuaberrios ปีที่แล้ว

    Wow....I need to make the change.
    Seems life changing ✨

  • @abhinavthapa5894
    @abhinavthapa5894 2 ปีที่แล้ว +11

    I'm a pnpm user but I've encountered many bugs and problems with it. Small projects? Sure, but I'd stick to yarn for the bigger ones.

  • @edenassos
    @edenassos 2 ปีที่แล้ว +24

    pnpm is cool but there are many projects that have issues with it like Nuxt.

    • @zkochan
      @zkochan 2 ปีที่แล้ว +10

      For such projects you may set the node-linke=hoisted setting for pnpm (via .npmrc). It will create a "classic" node_modules but you still get other benefits of pnpm, like speed and disk space efficiency.

    • @0jinx
      @0jinx 2 ปีที่แล้ว

      @@zkochan does this work for react, next and expo projects ? Cause I really think pnpm is super cool, but it's painful inability to work on more complex installs is a big deal breaker.

    • @zkochan
      @zkochan 2 ปีที่แล้ว +2

      @@0jinx it works with everything. If there are issues, you can set "shamefully-hoist=true" and run "pnpm install". If there are still issues, you set "node-linker=hoisted", remove node_modules and run "pnpm install".

    • @abhinavsingh-zc2hk
      @abhinavsingh-zc2hk 2 ปีที่แล้ว

      @@zkochan thx for this info

  • @mizzkun99
    @mizzkun99 11 หลายเดือนก่อน

    Wowww.. ITS amazing bro🎉

  • @Aspiiire
    @Aspiiire 2 ปีที่แล้ว

    That's amazing thank you, I thought "oh noo yet another thing to change" but you convinced me that It's kinda must to change with this features

  • @hanashi8150
    @hanashi8150 ปีที่แล้ว +2

    I tried it:
    npm install express: 2,804s
    pnpm add express: 2,752s
    It's not really faster.

  • @matrinoxtm
    @matrinoxtm 2 ปีที่แล้ว +2

    Thanks for exposing this. But there’s not a lot of explanation of what it solves. “It solves security issues”. Which ones? And how?

    • @zkochan
      @zkochan 2 ปีที่แล้ว

      That is probably some misunderstanding. By security he probably means that the app code has only access to dependencies that are added as dependencies to package.json. So your package will not break when installed as a dependency.

  • @abc33155
    @abc33155 ปีที่แล้ว +1

    So pnpm doesn’t have a flat node_modules directory but instead has an equivalent flat .pnpm directory? Just use the latest Yarn (it has different options which you need to research). There is no need for a complicated directory tree structure and symlinking when you can keep the dependency tree information in a file.

  • @thekwoka4707
    @thekwoka4707 2 ปีที่แล้ว +3

    PNPM has great package aliasing/overrides and have built in node version control.

  • @daniil2704
    @daniil2704 11 หลายเดือนก่อน +1

    Using hard links instead of copying doesn't matter when you have btrfs 😎

  • @danielelgressy
    @danielelgressy 2 ปีที่แล้ว

    Thanks for the video ! what type of microphone are you using? sounds great

  • @lukkklukk7045
    @lukkklukk7045 2 ปีที่แล้ว +1

    Cool, I think it is time for me to finally switch from npm to something new and it will be pnpm. Thanks!

  • @RuslanPanasyuk
    @RuslanPanasyuk ปีที่แล้ว +2

    Interesting, but Yarn v2+ does not use node_modules at all

  • @codernerd7076
    @codernerd7076 2 ปีที่แล้ว +6

    Think Yarn v3 does something similar

  • @HikaruAkitsuki
    @HikaruAkitsuki 7 หลายเดือนก่อน

    Okay! I gonna switch to PNPM tomorrow.

  • @RasmusSchultz
    @RasmusSchultz 2 ปีที่แล้ว +28

    I never switched to Yarn, and I most likely will never switch to this. Yarn was an optimization, this is an optimization, and neither of these should have been a new package manager - they should have been a PR against the existing package manager. This is a clear case of throwing away the baby with the bath water. And you come out with benchmarks - and yeah, the benchmarks look great, and it's really the only thing anybody talks about when they push for these alternative package managers. But a package manager is so much more than just "npm install", and it gets us into so many edge cases and problems with these tools. And don't get me started about splitting the ecosystem, the inconsistent tooling, the added learning curve and confusion and complexity, the time people will waste bikeshedding over the best package manager, and on and on. These tools are just an optimization, and if these changes are really reliable, if they're really any good, they should have shipped these as features/changes to the original package manager. For all the time you people waste debating which package manager is the best, learning new commands (which have arbitrarily been renamed and changed for no other reason besides developers being opinionated) trying to solve incompatibilities, teaching and learning and pushing your benchmark nonsense, yeah, this saves you a little time over "npm install", which you've likely more than paid back already with all the mess and complexity you add for yourselves and anyone who has to work with you or tries to contribute to your projects. These tools shouldn't exist. And you care about all the wrong things. 😒

    • @shunia
      @shunia 2 ปีที่แล้ว +1

      Great opinion, lil bit over though.
      It's actually annoying when something just goes wrong when you have to co-op with others - which will sure happen, and you have to dig through the whole internet, read through all the comments to find a solution, and then sitting there gets mad.
      I'm actually a pnpm user, and it's really fantastic, but yes I do agree with you.

    • @oliverhughes169
      @oliverhughes169 2 ปีที่แล้ว +6

      I kind of agree... but the world is not black and white like this. Sometimes it takes the learning of one project to apply to another. Sometimes it's easier to start from fresh, than change the original. Sometimes people do not agree and they create their own forks. It will always happen so long as we have a rich and diverse opensource ecosystem. The best case scenario in this example is that NPM contributors can see the progression of tools like Yarn and pnpm and use this to improve their own. As a developer using these tools, it's a win win and you have the freedom to choose whatever suits your needs best.

    • @leviolson
      @leviolson 2 ปีที่แล้ว +18

      I guess I disagree a tiny bit on this one. Although I totally agree on the arbitrary renaming of commands (that's super stupid)...
      PNPM is a fundamentally different approach in how to store dependencies when compared to NPM. The rework required to change NPM to this new approach would not only be much more than "just a pr", it would be a huge undertaking to make it backwards compatible. This is probably the number 1 reason NPM wouldn't adopt something like this. So the developers of PNPM have few choices, fork or create another alternative.
      While I don't like change for the sake of change, I believe there will always be evolution, and this is definitely an evolutionary step in my opinion.

    • @DnKZone
      @DnKZone 2 ปีที่แล้ว +2

      npm gives you too many errors and also it's also makes the project heavy
      pnpm solves it, so why not we switch to this?

    • @novailoveyou
      @novailoveyou ปีที่แล้ว +1

      When working with large monorepo (turborepo, nx etc) that got many apps fully loaded with TS & Storybook $ ESList etc and multiple team members, npm just doesn't seem to cut it (too large of a space&time complexity). Altho I agree that having different names for commands (as yarn does) for the sake of it isn't nice, pnpm has the same names as npm so it's quite intuitive in that regard. In the end tho, it's all project specific. When working with micro services where each service has it's own repo, the simplicity & availability benefits of npm become brighter.
      So it's up to each of us what's right for our projects, it's always better to have options, isn't?

  • @AmineOnline
    @AmineOnline 2 ปีที่แล้ว

    Best so far

  • @AindriuMacGiollaEoin
    @AindriuMacGiollaEoin 2 ปีที่แล้ว

    These tools are getting better and better

  • @soanvig
    @soanvig 2 ปีที่แล้ว +10

    I think it's not taking yarn berry (v2+) into account which kindof revolutionazes package manager approach in node stack

    • @zzzyyyxxx
      @zzzyyyxxx 2 ปีที่แล้ว

      Yep at 11:29 you can see he's still using yarn 1, not the new yarn versions

    • @ahmedifhaam7266
      @ahmedifhaam7266 5 หลายเดือนก่อน

      because this is a staged video.. he removed the lock files for npm and yarn during the install.

    • @soanvig
      @soanvig 5 หลายเดือนก่อน

      ​@@ahmedifhaam7266what lockfiles have to do with it?

  • @mrrolandlawrence
    @mrrolandlawrence 2 ปีที่แล้ว

    neato. using pnpm. you've convinced me. also using vite this year. development has never been so fast...

  • @tonyarcher7733
    @tonyarcher7733 2 ปีที่แล้ว +2

    Sorry, pnpm is using the npm cache. So you cleared the cache out to begin with, let npm spend time downloading the libraries, and then pnpm just symlinked them. I'm sure you didn't mean to, but the result is not a legit test result. Also, at about second 0:43 you peekaboo a benchmark where pnpm is not faster, but we don't get to see what that was :(

  • @shapelessed
    @shapelessed ปีที่แล้ว

    I'm not interested in PNPM because of "fast downloads", but more because of preserving space on my laptop's SSD when I'm on the go (It's a MacBook, yes, I know... I know....)
    Also, you can actually install PNPM with NPM itself nowdays.

  • @jeffersonribeiro1669
    @jeffersonribeiro1669 2 ปีที่แล้ว +2

    I was surprised to see my React Shopping Cart in the example, thank you man :D

    • @CoderOne
      @CoderOne  2 ปีที่แล้ว

      Thanks for making it open-source

    • @ahmedifhaam7266
      @ahmedifhaam7266 5 หลายเดือนก่อน

      surprised you didnt switch to pnpm XD, this was a staged video btw.

  • @tissueboi
    @tissueboi ปีที่แล้ว

    can you do a comparison of it with yarn V2? I heard yarn V2 does not use node_modules? sorry. newbie here.

  • @marilynyballa809
    @marilynyballa809 2 ปีที่แล้ว

    Thank you!

  • @juliohintze595
    @juliohintze595 2 ปีที่แล้ว +7

    I really like the concept, but I had some problems with it before. Bugs that are absent in npm and yarn.

    • @zkochan
      @zkochan 2 ปีที่แล้ว +5

      For such projects you may set the node-linke=hoisted setting for pnpm (via .npmrc). It will create a "classic" node_modules but you still get other benefits of pnpm, like speed and disk space efficiency.

  • @Duconi
    @Duconi ปีที่แล้ว

    If you speak about yarn, do you speak about yarn 1 or yarn 3 and if yarn 3, have you tried the different modes? Has yarn 3 the same performance with the pnpm mode as pnpm itself?

  • @rajbarnwalofficial
    @rajbarnwalofficial 3 หลายเดือนก่อน

    time command is not working. can you please guide me how to run/install command with time prefix

  • @rujor
    @rujor 2 ปีที่แล้ว

    It would have been helpful to see how you solved the missing peers :(.

  • @SchioAlves
    @SchioAlves ปีที่แล้ว

    Well, I tried using it on an ionic angular project and pnpm import reports success, without creating a node_modules folder or whatsoever

  • @OzoneGrif
    @OzoneGrif 2 ปีที่แล้ว +1

    Interesting, I just tested it on a big project, but it wouldn't compile using PNPM, I switched back to YARN, and everything works again.
    I also found it to be way slower than YARN for some reason.
    I guess it's not perfect as it may cause issues in some edge cases.
    I'll try it against later on smaller projects; it will probably work just fine on these.

    • @hiagooliveira6510
      @hiagooliveira6510 2 ปีที่แล้ว

      Weird. Was your project perhaps using node v10 or v12 and were you trying that with pnpm v7? pnpm v7 only works on node 14 and older for example

    • @OzoneGrif
      @OzoneGrif 2 ปีที่แล้ว

      @@hiagooliveira6510 I'm on Node 16.14.2. and yes pnpm v7.

    • @zkochan
      @zkochan 2 ปีที่แล้ว +1

      When pnpm doesn't work, you can always use it with the node-linker=hoisted setting. In that case it will create a "classic" node_modules without using symlinks.

  • @MichaelTrouw
    @MichaelTrouw 2 ปีที่แล้ว +1

    Why does PNPM add Express as a dependency of Express? "it allows express to import itself" this makes absolutely 0 sense to me. Who can enlighten me?

  • @salmandabbakuti
    @salmandabbakuti 2 ปีที่แล้ว

    I wonder why comparing it with npm? under the hood they (yarn or pnpm or any other package managers) resolves packages from npm registry. isn't it?

  • @fredericoasoares
    @fredericoasoares 2 ปีที่แล้ว

    Wow...you helped me save 3 souls!!!!!!

  • @AlessioCollura
    @AlessioCollura ปีที่แล้ว

    I already knew pnpm, it sound great, but never used it because I kept asking if it's so great why isn't anyone using it? There's any compatibility problem or workaround necessary?

    • @ahmedifhaam7266
      @ahmedifhaam7266 5 หลายเดือนก่อน

      just use npm, the speed is about the same, this video is staged.. yarn v2 is nice too.

  • @Marcin2824
    @Marcin2824 2 ปีที่แล้ว +3

    1.8s think of it as 1 second. 10.44 nah its 11. problem? :D Nice video but you could be more objective.

  • @nuitech2190
    @nuitech2190 2 ปีที่แล้ว +1

    What is the downside of pnpm?

    • @zkochan
      @zkochan 2 ปีที่แล้ว

      There is no downside. If there are some issues with the symlinked node_modules, you can also switch to "classic" node_modules with the node-linker=hoisted setting.

  • @samislam2746
    @samislam2746 10 หลายเดือนก่อน

    Is that the hated one?

  • @王冠信-o1c
    @王冠信-o1c 2 ปีที่แล้ว

    I got a question about the peer dependency issue that in the last example installs all the necessary dependencies, but is it that simple to just install those missed packages? Or I might expect other issues after installation?

  • @ts8960
    @ts8960 2 ปีที่แล้ว

    With pnpm, is it possible to have 1 node_modules folder in ur computer and all the local projects direct to it instead of each project having its own node_modules because they share the same 90% of the files there as other projects?
    T

    • @zkochan
      @zkochan 2 ปีที่แล้ว +1

      no, you will have multiple node_modules but the files in each of that node_modules will be not copies of files but clones (or hard links) of files from a single content addressable store. So, the same file will not be written twice to the disk

    • @ahmedifhaam7266
      @ahmedifhaam7266 5 หลายเดือนก่อน

      it's not python.

  • @_checkit
    @_checkit 2 ปีที่แล้ว +2

    Inaccurate comparison. pnpm had missing peer dependencies while yarn took care of them.

    • @jpratt8676
      @jpratt8676 8 หลายเดือนก่อน

      Yep. Dude missed an opportunity to actually measure anything

  •  ปีที่แล้ว

    but pnpm does not compatible with react-native :(

  • @Sam-hu3xt
    @Sam-hu3xt 2 ปีที่แล้ว +14

    I think we have some responsibility as developers to not embrace any new technology that emerge any single day just because it seems faster? cooler? or what ever. I found this particular behavior really common in JS community, and it's making a mess in the ecosystem. Also, I seriously doubt of anyone that only tells me the pros of something but not the cons.

    • @streamekispi594
      @streamekispi594 2 ปีที่แล้ว +4

      I appreciate your answer, but personally i disagree with you. I'm David a midterm frontend developer form Hungary. I started using pnpm 26th of April. for a quick try I converted one of my oldest projects with pnpm to test is it actually works, and tried to add several dependencies which never worked together in npm (but yarn solved the problems for me). And I tried out to see if it solved the npm's problems. It did, but I have to mention i had to install several specific versions. I think it is a very powerful alternative, and i think in CS you shouldn't judge any new, because i think those bring the whole industry forward. But I'm not here to argue, just wanted to say my opinion.

    • @zkochan
      @zkochan 2 ปีที่แล้ว

      @@streamekispi594 köszi

  • @PrashanthPuranik
    @PrashanthPuranik 2 ปีที่แล้ว

    I fail to understand why people bother so much about npm vs yarn vs pnpm vs dadada?! How much time do we spend in our development effort installing or updating dependencies? Is all this discussion really worth it? I have serious reservations of the cost vs benefit of this. Any thoughts? I am open to your opinion 😄
    I guess the benefit would come not from performance but any security benefits or maybe better organisation and less bugs. Is there any significant gain in these goals?

    • @amidaobscura
      @amidaobscura 2 ปีที่แล้ว

      We have a couple of projects that requires compilation of heavy libraries. Every time there is a yarn install (yarn v1), it's recompiling the deps which can be very slow depending on your computer. So instead of losing focus by waiting, getting stuff installed in a couple of seconds, by for example symlinking already compiled deps, can make a notable difference in productivity and developer experience. I'd rather see npm improved though.

  • @matteofalduto766
    @matteofalduto766 2 ปีที่แล้ว +1

    I hate how in JS there seems always to be an awesome new thing that you absolutely have to glue in your increasingly disparate toolset

  • @transcrobesproject3625
    @transcrobesproject3625 2 ปีที่แล้ว

    This is absolutely typical for the JS community. Shiny new thing that starts out fast for certain usecases, but never gets to compete with the old boys properly. Then it adds new features that mean you have projects that *require* using this rather than one of the others.
    And is it just me or does it look like npm is actually a LOT faster for a number of common usecases, including the ones we care most about? I do update more often than I do install...

  • @joshua.hintze
    @joshua.hintze 2 ปีที่แล้ว

    I would love to use pnmp. However we use WSL2 at work and windows doesn’t support simlink folders. This makes it hard for ides like webstorm to crawl and find the dependencies.

    • @zkochan
      @zkochan 2 ปีที่แล้ว

      On systems that don't support symlinks pnpm uses junctions. Also, you may use pnpm without symlinks/junctions by setting node-linker=hoisted.

    • @scion911
      @scion911 2 ปีที่แล้ว

      Are you sure symbolic links don't work in windows or you are talking something specific about WSL2?

    • @DnKZone
      @DnKZone 2 ปีที่แล้ว

      You can still use pnpm it's officially supported

  • @fifty6737
    @fifty6737 2 ปีที่แล้ว

    the javascript package landscape is an insane mess, just copy NUGET, also prevent packages from being deleted off npm, it really frustrating when you trying to find the git repo of some deleted package

  • @eugenbeetl9751
    @eugenbeetl9751 2 ปีที่แล้ว +1

    what about patch-package compatibility?

  • @jpratt8676
    @jpratt8676 8 หลายเดือนก่อน

    Doesnt npm do this now?

  • @jakubsurdej4339
    @jakubsurdej4339 2 ปีที่แล้ว

    no, you should not switch as soon as possible
    if dependency install waiting time becomes a problem it is probably a problem with your dependencies, that you don't really need, not with package manager
    i dont say that pnpm is a bad choice- just that pnpm is NOT the best choice for EVERY project
    tools like npm and yarn are way more mature. i personally just tried pnpm in random project that i was working on some time ago
    and yes, instllation time was way faster (the procedure i used was installing dependencies once, then deleting all dependencies, then measuring time of execution for both yarn and pnpm), in my test case it was 7s for pnpm and 25 for yarn
    but i was no longer able to build the project using single command (without changes to package.json). why?
    because my build scripts looks like this
    ```
    "prebuild": "rimraf dist",
    "build": "nest build",
    "prebuild:prod": "yarn build",
    "build:prod": "yarn pkg --public --compress GZip -t node17-linuxstatic dist/main.js -o out",
    ```
    and pnpm can't understand pre and post scripts. i think it is a thing worth mentioning.
    also, i tried to use lifecycle hooks. according to pnpm docs, the only lifecycle hook is pnpm:devPreinstall. but the, suddenly my postinstall script got executed. why isn't it documented?
    there is a page in pnpm wiki named "feature comparision", which mentions functions that other package managers have, but pnpm don't (and vice versa). if you want to convince somebody why should he switch package manager i think it is the place to start from
    pnpm looks very promising, but for now i decide to wait for it to be more widely used- right now i cannot be sure that there won't be any issues that will eventually slow me down during development, instead of making it faster.
    edit: also, i don't see command like yarn upgrade-interactive --latest implemented in pnpm, just pnpm outdated and this may be very annoying

  • @mangadi3859
    @mangadi3859 2 ปีที่แล้ว +1

    god that was fast!

  • @JaimitoAleman
    @JaimitoAleman 2 ปีที่แล้ว

    Why do `pnpm imort` instead of just install?

    • @zkochan
      @zkochan 2 ปีที่แล้ว

      "pnpm import" is only needed if you already have a lockfile from yarn or npm and you want to generate a pnpm lockfile using information from package-lock.json or yarn.lock.

  • @_checkit
    @_checkit 2 ปีที่แล้ว +1

    It didn't take 1 second. It took 1.8 seconds......

  • @harshmudhar96
    @harshmudhar96 2 ปีที่แล้ว +5

    Nice try buddy but I'm not changing my package manager again.

  • @guilhermedosreis2459
    @guilhermedosreis2459 2 ปีที่แล้ว

    Does anyone have the link for the git repository of the shop website he used in the example?

    • @CoderOne
      @CoderOne  2 ปีที่แล้ว

      There you go: github.com/jeffersonRibeiro/react-shopping-cart

  • @themaninblack5022
    @themaninblack5022 2 ปีที่แล้ว +3

    Ahh honestly it depends from project to project… I’d never pigeonhole myself into one over the other.

  • @StellarWeb008
    @StellarWeb008 2 ปีที่แล้ว

    On switching to pnpm, we would miss the cool loading spinner that npm had

    • @CoderOne
      @CoderOne  2 ปีที่แล้ว

      I like yarn's progress bar 😀

    • @StellarWeb008
      @StellarWeb008 2 ปีที่แล้ว

      @@CoderOne Intresting. But pnpm doesn't have it. Progress bar of pmpm looks lame

  • @Aj-po9dc
    @Aj-po9dc 2 ปีที่แล้ว +1

    I like using pnpm... I dunno... seems fine to me.

  • @scottfwalter
    @scottfwalter 2 ปีที่แล้ว

    Does it work with AWS Code Artifact?

    • @zkochan
      @zkochan 2 ปีที่แล้ว +1

      Yes. But if it doesn't support symlinks, you'll have to use the node-linker=hoisted setting.

  • @faucar93
    @faucar93 2 ปีที่แล้ว

    Problem is the dependencies

  • @mworld
    @mworld 2 ปีที่แล้ว +1

    Tried using pnpm on a vue app recently and it failed. yarn worked fine.

  • @SXsoft99
    @SXsoft99 2 ปีที่แล้ว +1

    you know i ussualy use the install time to go grab a coffe

  • @imnotchinese6235
    @imnotchinese6235 2 ปีที่แล้ว

    but yarn has a cute logo...

  • @tommyinb
    @tommyinb 2 ปีที่แล้ว

    NPM workspace is less buggy than PNPM.
    Although I know it is not PNPM but the libraries to blame.

  • @bradenborman4396
    @bradenborman4396 2 ปีที่แล้ว +1

    1.85 second - yeah took one second lol

  • @jeremey__
    @jeremey__ ปีที่แล้ว

    more overhead to save couple of seconds

  • @maxkinli
    @maxkinli 2 ปีที่แล้ว +1

    Npm doesn't support Ukrane. Interesting

    • @zkochan
      @zkochan 2 ปีที่แล้ว

      bummer

  • @thedeveloper9896
    @thedeveloper9896 2 ปีที่แล้ว

    this dude is saying pnpm is fast but it's still slow for my slow-ass laptop and wifi 😂

  • @monstardev7189
    @monstardev7189 2 ปีที่แล้ว

    One extra letter to type? Madness

  • @kosm4627
    @kosm4627 ปีที่แล้ว

    diversity in JS is good and bad thing at the same time... While offers a ton of libs to make our lives better , disorientate (new) devs with a lot package managers , we should move on , and make deprecated old package managers , proven not good in performance in core of their arch..

  • @jack90170
    @jack90170 2 ปีที่แล้ว +1

    checkout newer npm 8 its superfast

  • @kuroexmachina
    @kuroexmachina 2 ปีที่แล้ว

    no

  • @antoinealez12
    @antoinealez12 2 ปีที่แล้ว

    Bruh wtf another one!!!

  • @adamhenriksson6007
    @adamhenriksson6007 2 ปีที่แล้ว

    Pass

  • @RoyerAdames
    @RoyerAdames 2 ปีที่แล้ว

    Solved: Remove some script from angular cli. For some reason some scripts broke and some packages where not install by default on pnpm install
    Bro I uninstall the my yarn packages and I still it with pnpm, and it doesn't work. An unhandled exception occurred: Script file node_modules/marked/marked.min.js does not exist.
    See "/private/var/folders/kb/5w49qrc551z1chsj_x4fhz1r0000gn/T/ng-SCa1hV/angular-errors.log" for further details.

  • @EternalCoders
    @EternalCoders 5 หลายเดือนก่อน

    according to Fast installation npm > yarn > Pnpm > BUN. 😇🐣 ( bun takes shortest time to install things)