What is NPM's package-lock.json?

Поделиться
HTML-код
  • Опубликовано: 23 авг 2024
  • I was minding my own business trying out npm install. It was going so well, then this weird package-lock.json file appeared.
    It just kind of turned up uninvited.
    Turns out that npm adds this file automagically, to represent the versions of all the packages installed in node_modules.
    But what's the point of package-lock.json and how do you use it?
    🦸 GRADLE HERO COURSE tomgregory.com...
    🚀 FREE INTRODUCTORY GRADLE COURSE tomgregory.com...
    ▶️ Watch me next
    Gradle Was Hard Until I Learnt This INSANE Secret • Gradle Was Hard Until ...
    10 Tips To Use Gradle With IntelliJ IDEA In 2022 • 10 Tips To Use Gradle ...
    🌍 Read more about npm on my website tomgregory.com...
    💌 Sign up to my monthly newsletter tomgregory.com...

Комментарии • 26

  • @FengolZA
    @FengolZA 2 месяца назад

    For years I've had the lock file my project and finally bit to bullet to try and understand what it is. This video couldn't make it any clearer. Thank you so much!

  • @reidmoffat7055
    @reidmoffat7055 Год назад +1

    This way you presented this video is incredible; incredibly informative & clear and straight to the point - in 3 mins you answered all my questions better than all the stack overflow questions I've read over the last few years. Incredible channel 🙏

  • @user-wn7mi1rj6s
    @user-wn7mi1rj6s Год назад +2

    Great video, you explained it so accurately. Cleared a lot of blur about the package-lock json file. You should make more videos.

  • @krishnakandula6587
    @krishnakandula6587 Год назад +1

    The presentation and the conceptual clarity of the video is unbelievable. Thank you.

  • @iurysza
    @iurysza Год назад +1

    You're very good at this! Quality content, great editing, great humor.

  • @aakashpatel9281
    @aakashpatel9281 3 месяца назад +1

    really appreciate the video . Keep it up 👍

  • @poppin_party
    @poppin_party Год назад +1

    thanks bud, I finally understand wth package-lock is

  • @sundarraj9384
    @sundarraj9384 9 месяцев назад

    Simple, Clear and Good

  • @aben5960
    @aben5960 Год назад

    I really appreciate your efforts to produce such an amazing video :)

  • @Ahmed-fq3kz
    @Ahmed-fq3kz Год назад

    great informative video with some comedic scenes. I think you will fit perfectly as voice over

  • @rajatguleria4933
    @rajatguleria4933 Год назад +1

    Awesome bro, I watched some videos on the same and thought of the same question why would ^ be in the package.json and lock.jason file exist together but no one mentioned the same except you.

  • @harshasinha5499
    @harshasinha5499 6 месяцев назад

    beautiful answers explained nicely

  • @user-ed1jc6xl9r
    @user-ed1jc6xl9r 5 месяцев назад +1

    omg thx u

  • @RavenFelman
    @RavenFelman Год назад +1

    thank you so much!

  • @lightoo4343
    @lightoo4343 Год назад

    Should we ever delete lock file? How will it affect dependencies ?
    Amazing content !😊

    • @TomGregoryTech
      @TomGregoryTech  Год назад +1

      There's no reason to delete it. You might get different dependency versions to someone else using the same repo.

    • @lightoo4343
      @lightoo4343 Год назад

      @@TomGregoryTech thank you so much 😊

  • @RichardRebeco
    @RichardRebeco Год назад

    gracias amigo

  • @randalljosue
    @randalljosue 9 месяцев назад

    But what about the fact package-lock.json also has ~ and ^?
    It would just then NOT install the exact version of packages...

  • @valikonen
    @valikonen 15 дней назад

    Jesus Bob you have a talent to speak outside of topic....I hope your mom will cut your access to internet ;)

  • @b25671
    @b25671 11 месяцев назад

    Why didn't npm just change the functionality of "npm install"... which installs and automatically updates
    ... to just "install"... without the automatic update
    And if you want to update the packages... you use the "npm update" command
    ... like you do now?
    I don't get it.

  • @GregorGramlich
    @GregorGramlich Год назад +1

    I know lock files from the various package managers of Ruby, Python and NodeJS.
    A similar functionality exists for Gradle (Locking dependency versions in the user guide). Why seems to be so little talk about that? Why don't you - as the Gradle guy - talk about it or mention the parallels in this video?
    Are the other Gradle mechnisms prefered over locking dependencies? I honestly don't understand why this feature seems to be so unpopular for Gradle.

  • @Draconicrose
    @Draconicrose Месяц назад

    Oh. OH! Oh wow. Okay. THEN WHY DON'T THEY JUST SAY SO- /sigh. Thank you for the video.

  • @pstha4537
    @pstha4537 Год назад +4

    too many useless content. Get to the point. make it concise.

  • @Markus-iq4sm
    @Markus-iq4sm Год назад

    Weak explanation