Figured I would just ask for the abstract basics. Just consider me an amateur noob. I was digging into ComfyUI code to look into integrating or rewriting a script of mine into a custom node for the first time. The source for custom nodes sourced through the ComfyUI node manager have some kind of Yarn package or system. I have no idea what that is or what it is used for and figured it might make a light conversation.

  • RagingRobot@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    10 hours ago

    Yarn is a package manager. It lets you install libraries and run scripts for JavaScript.

    If you need to add a library to your project you do something like ‘yarn add react’ for example. That would install react in your project.

    If you write code that needed to be compiled or you wanted to minify it or change it in some way you can also use yarn to help.

  • roadrunner_ex@lemmy.ca
    link
    fedilink
    English
    arrow-up
    10
    ·
    19 hours ago

    So, there are a lot of words in the post that I’m not familiar with (LoRA, Oobabooga, CivitAI). However, I think those are details about the actual library or package you’re looking at, so I will not touch any of that.

    I can strict answer the question “what is Yarn?”

    Long story short, it’s a direct “competitor” to NPM (Node Package Manager). In the earlier days of Node and NPM, Yarn was an attempt to improve certain weaknesses perceived in NPM (including speed and security). Yarn is still used in many codebases, but it’s become less popular over the years as NPM has resolved many of the things that Yarn sought to fix. Also, Yarn version 2 made a major design change which some have viewed as too radical (though I’m unclear on the details as I’ve only dabbled in v2).

    https://en.wikipedia.org/wiki/Yarn_(package_manager)

    • limer@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 hours ago

      yarn was popular because it could be a drop down replacement for npm. Now there must be a lock in to support edge cases most projects don’t need (or know about)?