redwood: `yarn install` fails when a `package.json` exists in home directory

Having installed yarn 3 globally (in home directory), running

yarn create redwood-app ./redwoodblog

fails with

  ❯ Creating Redwood app
    ✖ Checking node and yarn compatibility
      Creating directory '/home/philzen/prog/testing/redwoodblog'
    Installing packages
    Convert TypeScript files to JavaScript
    Generating types

Error: yarn >=1.15.0 <2.0.0 required, but you have 3.2.0

Interestingly enough, i wasn’t even executing yarn when i stumbled into this – i was actually giving pnpm create redwood-app ./redwoodblog a go for the sake of checking how far it would get me with my preferred package manager.

However, re-checking running yarn yielded the same error.

I’m already successfully using yarn 3 for an existing project, however it seems i cannot create new one with it.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

@simoncrypta I was able to fix this -

This might have been an issue with my volta installation of Yarn. To fix the issue, I followed the following

  1. uninstalled yarn and removed .yarnrc and .yarnrc.yml from my root folder.
  2. cleaned npm cache with sudo npm cache clean -f
  3. Installed yarn back to the system.

Now the command works fine and I am not facing any issues