Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Yarn missing as a dependency or devDependency #459

Closed

Description

@NorthDecoder

Describe the bug:

Yarn is referenced in CONTRIBUTING.md prior to it being listed as a prerequisite in the documentation or in package.json. In a fresh install for example during a continuous integration build or when setting up a develop environment for the first time running the recommended command does not work.

yarn db:reset
# returns
-bash: yarn: command not found

Issue #447 references this same issue as a line item.

Tell us about your browser and operating system:

  • Browser(s) name and version: terminal
  • Operating System:
uname -ior
5.3.7-301.fc31.x86_64 x86_64 GNU/Linux

node --version
v14.16.0
npm --version
6.14.11

Activity

  1. allella commented on Mar 24, 2021

    @allella
    Contributor

    @NorthDecoder is this issue only when running "Manual Mode"?

    The Docker Mode uses an official node:14-alpine Docker image and it appears from peaking under the hood that the Docker image makes yarn available.

    If that's the case, we can update the docs for Manual Mode to mention installing yarn as a prerequisite.

    I have yet to run through manual mode, since it was added after Docker, and was being used by more advanced developers who wanted more flexibility and speed vs the Docker Mode.

  2. allella commented on Mar 24, 2021

    @allella
    Contributor

    We think the yarn issue on #447 was more related to Git bash having a bug with how it runs yarn in its own psuedo-shell. So, the errors are likely similar but could be two different issues. In this case, the issue is clearly that yarn isn't installed or in the PATH where the app shell can find it.

  3. NorthDecoder commented on Mar 24, 2021

    @NorthDecoder
    ContributorAuthor

    Oh! I was trying to run the yarn command prior to creating a docker container. I was doing that because I was working on understanding the .env documentation wording and I thought I needed to reset the database after several failed attempts. The more I read, the more enlightened I become. I think I will wipe out the entire install and start fresh.

  4. allella commented on Mar 24, 2021

    @allella
    Contributor

    It may still be the case that we need to add yarn as a prerequisite for Manual Mode, because I'm not sure anything else installs it besides the Node Docker container.

  5. allella commented on Mar 24, 2021

    @allella
    Contributor

    Also, we could use more input on to if yarn should be included in dependency or devDependency. My limited understanding is npm is the default and yarn is an alternative.

    Though, package.json obviously runs some yarn commands, so it's unclear to me what needs to be done because there's also a yarn.lock file.

  6. ojeytonwilliams commented on Mar 24, 2021

    @ojeytonwilliams
    Contributor

    Could we avoid using yarn entirely? I could be mistaken, but it seems simpler to maintain a single package manager. All the yarn commands could just as easily be npm run commands.

  7. allella commented on Mar 24, 2021

    @allella
    Contributor

    That's a question for @Zeko369. I assumed someone started using both for a reason, but I also understand it's basically just npm.

  8. allella commented on Mar 24, 2021

    @allella
    Contributor

    @timmyichen has also helped with some yarn and npm questions, so perhaps he can share thoughts on if we can move to one or the other since yarn has been the source of a number of the most recent issues.

  9. NorthDecoder commented on Mar 25, 2021

    @NorthDecoder
    ContributorAuthor

    While I suspect my original observation is still true regarding the availability of yarn

    npm ls | grep "yarn"
    # returns nothing

    I solved my original problem with docker container prune which removed all the conflicting containers, which has nothing to do with this yarn issue. Right now this issue is not a blocker for me.

  10. timmyichen commented on Mar 25, 2021

    @timmyichen
    Contributor

    When I was more actively involved we exclusively used npm; I'm not sure who added yarn and why.

  11. ojeytonwilliams commented on Mar 25, 2021

    @ojeytonwilliams
    Contributor

    Given that this is generating a few issues, I played around with removing yarn locally and I couldn't see any side-effects.

    @allella would it be okay if I created a PR and pinged Fran for a review?

  12. allella commented on Mar 25, 2021

    @allella
    Contributor

    @ojeytonwilliams that sound good to me. Normalizing on npm, at least for now, could help close out some issues and cause less confusion.

    There are a number of references to yarn in the CONTRIBUTING.md, so we'll want to update that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions