How to handle dependencies in JS/TS monorepos | From Zero to Turbo - Part 2

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

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

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

    I forgot to mention why I didn't include Bun! I've heard complaints from community members that dependency resolution for Workspaces with Bun is a somewhat buggy, so I didn't include it quite yet. I've also experienced this myself.
    Maybe in the future, we'll talk more about Bun!

  • @StartCoadingWithMe
    @StartCoadingWithMe 2 месяца назад +17

    Sir please continue this series

  • @thanhlamnguyen1044
    @thanhlamnguyen1044 2 месяца назад +3

    I subscribed since the part 1, can't wait for the next part

  • @codingchewie
    @codingchewie 19 дней назад +1

    Would love a video on syncpack where I can set the react dep and devDep along with the react dom and react types so that throughout the monorepo I can enforce versioning likely through GitHub actions on the PR.

  • @lucaspatrick917
    @lucaspatrick917 2 месяца назад +5

    dude, continue this series, pls

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

    Literal lol @ 11:56. Thanks for these monorepo videos, they're very helpful and in sync with the Turborepo docs I was just going through (I wonder why 🤔). Hoping to continue seeing more. Also, you're a natural on camera and the editing is great 👍

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

    keep these coming

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

    Looking forward to the next part

  • @LanceYoung-j1q
    @LanceYoung-j1q 2 месяца назад +1

    Super helpful series - really appreciate this work - it's helping me achieve my dreams :))

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

    A new feature of pnpm is Catalogs, and it allows defining the version of dependencies used by multiple monorepo packages, allowing for them all to use the same version easily.

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

      Yes, a great feature. I wanted to shown syncpack as the agnostic version, and I’d 100% do Catalogs in a pnpm-specific video.

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

    Can't wait for the next part.

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

    Hope you will continue this serie, it’s far the best I have ever seen !
    I have a little question , I’m not sure about it, if my whole app is using TypeScript, I can add global devDependency and remove it from all apps right ?

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

    good use case of an optional dependency would be for analytics or logging. You can use it as a form of dependency injection that the controlling application can decide if it is present or not

  • @rand0mtv660
    @rand0mtv660 2 месяца назад +3

    9:22 even if it doesn't do anything in the end in some cases, I still like to separate regular and dev dependencies just so that it's clearer what's supposed to be used for app code and what's more related to development tooling.

    • @anthonyshewww
      @anthonyshewww  2 месяца назад +1

      Totally works! Exactly what I meant by “whatever you want.” 😁

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

    Thanks for the explanation of peerDependencies

  • @JulioGarcia-yc3kl
    @JulioGarcia-yc3kl Месяц назад +1

    please continue this series 🙏🙏🙏

  • @mattlaw4395
    @mattlaw4395 2 месяца назад +1

    Yarn modern workspaces + turborepo is my favourite combination. Especially its package hoisting common deps. You know you’ve messed up when you see node mods within a package itself (unless intentional)

  • @prmshzkarmacharya2069
    @prmshzkarmacharya2069 2 дня назад

    What if i have two nest js application in a monorepo how to manage the dependency of the packages like @nest/common or any common packages as these packages are required by the multiple nestjs application for now i am installing it in root package.json what would be the better approach ?

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

    Subbed! Really helpful

  • @MinhajulIslam-h8s
    @MinhajulIslam-h8s Месяц назад

    In our Expo app, we had to patch a dependency, but now that we’ve set up TurboRepo with the Expo app, the patch is no longer working.

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

      Turborepo isn’t responsible for dependency resolution so won’t play a role here.
      The only thing I can think of is possible an environment variable not accounted for in hashing. Have you tried using Loose Environment Mode?: turbo.build/repo/docs/crafting-your-repository/using-environment-variables#loose-mode
      If it works there, you’ll want to sort out the missing environment variable(s) and add them to your `env` key.

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

    What about Bun? I’m using Bun in turbo repo right now but noticed that whenever I install a new package it seems to break builds complaining that it can’t find vite config, and I need to remove node modules and reinstall.

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

      I forgot to mention why I didn't include Bun! I've heard many complaints similar to this one that dependency resolution for Workspaces with Bun is a somewhat buggy, so I didn't include it quite yet. I imagine it will get better in the future! Going to make a pinned comment for this.

    • @imho7992
      @imho7992 2 месяца назад +1

      i see thanks! Glad to know at least it’s not some obscure issue in my repo. Looking forward to the rest of the video series, these are probably the best videos so far on actually understanding Turborepo and best practices!

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

    Thank you!!!

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

    hey, what if I have a single dependency (specifically @types/* packages, etc.) that I want to use on multiple apps/packages? is it okay to install it on every one?

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

    I am learning about turborepo, i got far on a project using npm, is there a way to go back to using pnpm? Been using npm only since.

  • @Benjamin-Chavez
    @Benjamin-Chavez 2 месяца назад +1

    🙌

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

    wish you included bun and deno here

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

    How about make a video to manage imports? I mean if I'm gonna import an app into another one the linter show an error and rather rules like that. Btw good video :)

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

      You may be interested in github.com/vercel/turborepo/discussions/9435.

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

    monorepo + nextg.js + prisma ?????

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

    Waited for 3 months

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

      Sorry, I was on Parental Leave! The rest will happen much quicker.

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

    Upload video regularly

  • @WebGhost-wl5cj
    @WebGhost-wl5cj 2 месяца назад +1

    Waiting for next video please do upload once in week. Last videos was uploaded 3 to 4 momths ago and thanks

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

      100% agree

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

      I was on Parental Leave. Definitely looking to post more often!
      Thanks, both!