Get Started with pnpm

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ส.ค. 2024
  • Pnpm is a replacement for npm or yarn package managers. Because it creates a local store of all packages on your machine and then creates symlinks out to directories that need those packages, it 1) saves your hard drive space and 2) is much quicker than NPM (and often yarn!), especially on reinstalls.
    🔗 Key Links 🔗
    - PNPM docs: pnpm.io/
    ---------------------------------------
    📹 Related Videos 📹
    - Delete old node modules: • Delete old node_modules!
    ---------------------------------------
    🌐 Connect With Me 🌐
    - Website: codinginpublic...
    - Blog: chrispenningto...
    - Twitter: / cpenned

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

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

    Nice video!
    Just wanted to add that since NodeJs v16.9.0 corepack is shipped with NodeJs by default and corepack already includes pnpm (as well as other package managers). To use it one just have to enable it with the following command:
    corepack enable
    Then you should be ready to use pnpm without any further installations.

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

      Wow! Didn’t know that! Thanks!

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

    Excellent video! In ~3 minutes at 2x speed, I have a good understanding of the benefits of pnpm now! 🙏

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

      🙏 Great! You’re a legend, Simon. Love your Tailwind content. Thanks for the kind comment!

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

    Wow, thank you very much for this updated stuff. Found your channel today, the quality of your content is crazy good!

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

      Glad you’ve enjoyed it! :) thanks for taking the time to say something!

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

      @@CodinginPublic 🙇

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

    I love when I have a question for youtube and you have a video on it

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

    Thanks youtube algorithm for this recommendation

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

    great work, thank you!

  • @user-lv9vv8rm4j
    @user-lv9vv8rm4j 5 หลายเดือนก่อน

    you convinced me to switch to PNPM!

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

    0:39 > _"multiple projects --> node module folders add up a lot"_
    oh, so that's what ForrestKnight meant with "package management" in "things every dev should know"

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

    Your workplace looks beautiful 😍!
    What icon and colour themes do you use?
    Please share them with us 🙏🏻

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

      Sure thing. I'm using Bearded Icons, I believe? And I've done a video on my channel about themes/fonts :)

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

    Thanks that's nice & fast review 🙏

  • @jimmyj.6792
    @jimmyj.6792 2 ปีที่แล้ว +2

    Really really great discovery of pnpm 😍 and I really like your autocomplete cli (what do you use ? 😅)
    Do you use an extension to have your browser in your vscode to resize it easily whereas to have both separatly ?
    Really great content 🙏🙏🙏

    • @RahulKumar-fp1gy
      @RahulKumar-fp1gy 2 ปีที่แล้ว +1

      He is using Z-Shell along with OhMyZsh & zsh-autosuggestions plugin

    • @jimmyj.6792
      @jimmyj.6792 2 ปีที่แล้ว

      @@RahulKumar-fp1gy oh really interesting, thanks a lot for sharing 🙏🙏

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

      So that’s mostly all right. Im using the agnoster theme for ZSH. I’m also using Fig, an autocompleter tool for the terminal. Hoping to do a video on it all soon.

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

    Hey! I have some questions regarding pnpm
    1) How can I use pnpm in a vue js project?
    2) I'm having multiple issues regarding this even when switching from npm to pnpm because my local host isnt connecting.
    Nice video by the way.

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

      Glad you enjoyed it!
      1. You should be able to? I'm not a vue dev, so haven't tried it?
      2. Hmm…odd. There is an upgrade path to pnpm from npm here: pnpm.io/cli/import (not sure if I mentioned that in the video)

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

      @@CodinginPublic yeah it worked after I made a vue project using pnpm create @vue-latest thanks anyway

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

    This is really interesting thank you!

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

      You’re welcome! Thanks for saying something!

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

    This is awesome thanks alot, your the best

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

    i have been trying to install it but it doesnt want to work, it just says (in vscode) 'bash: pnpm: command not found'

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

    Nice video, tnx. Criss, how do you find so interesting things like this or open props ets. ?

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

      Glad you enjoyed it! The secret is just following more interesting people than me 😜

  • @wusaby-ush
    @wusaby-ush 2 ปีที่แล้ว

    Really great

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

    5:37 now, delete here is ofc not same as uninstall ...
    6:17 and current directory does not _have_ any significant node modules now in the first place
    ... so, will npkill get rid of files from that local user folders? i.e. is npkill same as uninstall?
    6:22 no, seems not uninstall, as it just deleted the local node_modules folder
    does pnpm track which modules are being used? and hence, allow to remove the modules which are currently unused?

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

    quality content as always can u make a vid on the new sass method, where u have to use @use and @forward instead of import?

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

      I need to figure it out myself! So I’ll figure it out and then do a video on it!

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

      @@CodinginPublic oh that's great waiting for the vid

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

      I'll try to not keep you too long :) May be a few weeks until I have time.

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

    For me it doesn't work. I don't understand why. I get "ERR_PNPM_LOCKFILE_NOT_FOUND" the lockfile is not found. Would it be possible to do a video explaining how to solve this error and how you proceed with "corepack enable"? thank you

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

      Hmm. Perhaps type the following first from within your project?
      pnpm install
      That should create your lock file. Core pack would be the same. You can just skip the step of installing pnpm directly, I believe.

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

    very good content, btw what theme and icons theme you use

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

      Glad you enjoyed it! Here’s my theme/font: th-cam.com/video/5uETTXxVj8s/w-d-xo.html
      I'm using Bearded Icons as of this video :)

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

    Well i have a question, when i kill vite server with ctrl c i have error: elifecycle command failed with exit code 1. I reinstalled the node packages remove the package lock file reinstall pnpm still have the error i don't have it with npm tho. What's going on 😮

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

      Hmm…it may be something wrong with your cached package files. There's a pnpm clear cache command (that may not be the exact wording…I'm not remembering offhand). That usually fixes things for me. Let me know if that helps!

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

    While the video itself was very interesting, I have to ask, Chris: how did you configure that sweet terminal command line?
    Thanks in advance :)

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

      Got a video coming hopefully in the next couple of weeks explaining my command line :)

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

      power-line plugin

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

      I forgot to add a link to the video I did on this. Here it is! My Custom Terminal Setup
      th-cam.com/video/DBASd9L4GCo/w-d-xo.html

  • @YousefMohamed-jb8bq
    @YousefMohamed-jb8bq 2 ปีที่แล้ว

    hi mate
    why are you using vs code?
    did you try webstorm?

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

      I mostly use VSCode because it's free and available to everyone; so it makes for better tutorials. I've not tried webstorm personally. It's on my list of things to check out.

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

    Very helpful thank you. Wabbalubadubdub!

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

    How would I fix problems by removing node_modules folder now))?

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

      Sometimes removing the node_modules folder and the package.LOCK file and reinstalling can solve weird issues. But it's mostly just a help to clear up space.

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

    1:11 does anyone know a similar alternate to python venv (virtual environments) ??
    they too download / create all the deps in the project directory - which i am not a big fan of.

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

    nice video

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

      Glad you enjoyed it!

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

      @@CodinginPublic I've tried to put all projects with the same node_modules.

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

    is it working without internet?

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

      You’ll need internet to access pnpm packages.

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

    hey your every videos is awesome. I want to share you video in facebook. I want to download this from youtube and upload in facebook. I think If I directly share the youtube link it wont be share much. Can I?

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

      You’re welcome to share the TH-cam link anywhere. Please do NOT download the video and upload it anywhere though.

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

      @@CodinginPublic yeap

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

    I added an alias in my .zshrc 😂
    aliase npm=pnpm