#20: peerDependencies in package.json - Mastering NPM

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

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

  • @blipojones2114
    @blipojones2114 4 года назад +30

    clearest explanation, better than docs or anything else I could find for the past hour!
    I'm knee deep in a project that involves monorepo tooling / workspaces and needed to know all this inside and out, thanks!

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

    A walk-through example can explain things so clearly. I've read the doc and different articles but just don't get the idea of it. With this video, it's so clear now...

  • @farhanaditya2647
    @farhanaditya2647 3 года назад +3

    Ahh, so peer dependency is like the inverse of dependency.
    For example:
    if A requires B, it means:
    B is the dependency of A
    A is the peer dependency of B (well, not necessarily, but you get the idea).
    Thanks for the simple explanation! Clearest explanation about peer dependency I've ever seen.

  • @moseslucas5933
    @moseslucas5933 2 года назад

    Very easy to understand. Your example of react and react-dom is the best.

  • @jorgek67
    @jorgek67 3 года назад +5

    I was going crazy trying to understand this by myself, thanks for sharing this!

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

    Brilliant explanation! Clear and concise

  • @금동대향로-g5y
    @금동대향로-g5y 2 года назад

    The example you gave using react and react-dom was perfect to get it. Thanks!

  • @m4heshd
    @m4heshd 3 года назад +4

    The best explanation on the internet regarding this topic. Goddamn you're good at that. Node & NPM docs sucks big time.

  • @codenamegrant
    @codenamegrant 3 года назад +2

    Thanks so much for this clear explanation and example. I totally understand the concept of peerDependencies now.
    *Saves "Master NPM" playlist to watch later* :D

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

    Great introduction to this concept. Subscribed.

  • @markojovanovic8444
    @markojovanovic8444 3 года назад +3

    Great explanation, thank you for taking your time to record this!

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

    Thanks a lot for this great series of npm videos. I learned much and things are more clear for me then before
    Well done!!

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

    This is really helpful mate.

  • @lavendercode
    @lavendercode 3 года назад

    Thank you. Wonderful video. Excellent explanation.

  • @jojojawjaw
    @jojojawjaw 3 года назад +1

    Great explanation, thank you so much!

  • @vipulnema
    @vipulnema 4 года назад +2

    Very well explained with Example. Thanks

    • @codedamn
      @codedamn  4 года назад

      You are welcome!

  • @chenni8759
    @chenni8759 3 года назад

    Thank you very much for this great video!

  • @VladislavSnegurov
    @VladislavSnegurov 2 года назад

    Explanation in documentation is a trash. Thank you for making it clear. Excellent explanation!

  • @rodrigoherrera7392
    @rodrigoherrera7392 2 года назад

    Great explanation

  • @marwentrabelsi2983
    @marwentrabelsi2983 3 года назад +1

    you just covered only 1 side of the problem.
    What happen if i do not want to expect that the host developer is installing this peer dependencies and instead i ship my library with dependencies instead? (so users of my library will not bother installing peer dependencies).

    • @angelmunoz6332
      @angelmunoz6332 2 года назад

      Hi, do you found an answer for this ? I'm asking myself the same question xD

    • @marwentrabelsi2983
      @marwentrabelsi2983 2 года назад

      @@angelmunoz6332 not really, the problem is some of the "leaders" in JS wolrd touching their left ear by their right hand! that must be fixed!

  • @poria3547
    @poria3547 3 года назад +1

    Just pay attention that npm 7 has changed this behavior.

    • @keteremillpario
      @keteremillpario 2 года назад

      You mean because of the fact that now it auto-install the peer-dependencies? Or there's something else?

  • @stodani
    @stodani 2 года назад

    could you explain whats the package.JSON that i have to add that on? i don't know how to find that file, or which one of all the paskage.JSON of my computer should i add it on. I need to intall Angular, and it asks me to install some dependencies, but of course as i still not have Angular there is not Angular's package.JSON file yet

    • @TheBswan
      @TheBswan 2 года назад

      From the terminal, in your project's root directory you can run `npm init` without the backticks to create a new package.json. I don't know about angular, but typically when you initialize a new framework-based application it should come with a package.json

  • @davidelsner9391
    @davidelsner9391 3 года назад

    Good explanation!

  • @YoussefZidan
    @YoussefZidan 3 года назад

    Then if I'm creating that needs other dependencies how force NPM to install it?

    • @akileshrao
      @akileshrao 3 года назад

      If you want to force npm to install something, you can simply put it in the main dependencies block and not have it as a peer dependency

  • @nikethreddy7113
    @nikethreddy7113 2 года назад

    Thanks!

  • @mohitgupta181191
    @mohitgupta181191 4 года назад

    Very helpful video. Thanks

  • @ehsankhorasani_
    @ehsankhorasani_ 3 года назад

    Good job

  • @meal-skipping-worker
    @meal-skipping-worker 2 года назад

    putting you out that "he" ? react dom probably. what is "he" ? you said.

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

    What should I do to fix warning? Do I need to add `react` to `package.json` or install it with `npm install react`?