Peer Dependencies - Explained

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

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

  • @pensandocomodev
    @pensandocomodev Год назад +2

    WOW!
    I'm currently going through that phase of updating my project's dependencies versions and needed to understand better about peerDependencies, because my company is using a monorepo, where it has multiple different libraries and some libraries depends on another libraries and eventually it all boils down to an app. I was just looking for this answer and bumped into your video and the way that you explained such a complex topic is mind blowing 🤯. You even got me thinking about another scenario that we have, when an application may opt-out of certain "sub dependencies" and really inspired me to keep on working on this task today.
    NPM library creation content are so difficult to find and yours was just **perfect**. tysm!!

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

      I do have one question though.
      Let's say I have an app that uses a library (created by me) that depends on the styled-components package. The styled-components package has a peerDependency "react-is". Should I add this peerDependency:
      a) as a *dependency* for my library?
      b) as a *peerDependency* for my library and as a *dependency* on my app?
      c) other - please explain

  • @stephenhu118
    @stephenhu118 7 месяцев назад +1

    I like your examples which really helped me to understand what peer dependencies really are.

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

      Excellent, glad it was helpful :-) Cheers Mark

  • @nyarlaaa
    @nyarlaaa Год назад +2

    Thanks for the helpful video. I've had to take over a project that hasn't been updated for years and with the "new" npm being more strict and angular's lackluster documentation it's been a right headache.

  • @Middollo
    @Middollo 7 месяцев назад +1

    Thank you! Great examples!

    • @Ashotofcode
      @Ashotofcode  7 месяцев назад

      Glad it was helpful! Cheers Mark

  • @shubhsingh4935
    @shubhsingh4935 6 месяцев назад +1

    Thankyou, It really helped :)

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

    I am updating my nextjs app and I installed(upgraded) packages with "--force" . It installed the packages, but "npm i" still gives the error. Will this be a problem when deploying on vercel?

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

      The error is just a warning once you have forced the install - just reminds you that there is no official support for the current setup you have and there may be mismatches. When you deploy as long as you are not running npm on the sever and just pushing up the locally built package then should be fine. Cheers Mark

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

    what about using package.json overrides in this case ? is not it better than using force or peer deph ?

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

    105

  • @juanfut11
    @juanfut11 10 месяцев назад +1

    Wasted 18 minutes for nothing