Redwood: [RFC] Support yarn2

Created on 7 Sep 2020  ·  5Comments  ·  Source: redwoodjs/redwood

I upgraded to yarn2 and now the Redwood scripts all fail with a variation of the Couldn't find a script named"rw" (or named "redwood").

~/Sites» yarn create redwood-app ./supporters-united-rw                     [9:31:05]
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 1.95s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ supports-color@npm:7.2.0 can't be found in the cache and will be fetched
➤ YN0013: │ tar-stream@npm:1.6.2 can't be found in the cache and will be fetched from
➤ YN0013: │ to-buffer@npm:1.1.1 can't be found in the cache and will be fetched from
➤ YN0013: │ unbzip2-stream@npm:1.4.3 can't be found in the cache and will be fetched
➤ YN0013: │ yauzl@npm:2.10.0 can't be found in the cache and will be fetched from the
➤ YN0000: └ Completed in 1.96s
➤ YN0000: ┌ Link step
➤ YN0007: │ core-js-pure@npm:3.6.5 must be built because it never did before or the last one failed
➤ YN0000: └ Completed in 1.36s
➤ YN0000: Done in 5.29s

  ✔ Creating Redwood app
    ✔ Creating directory '/Users/bill/Sites/supporters-united-rw'
    ✔ Downloading latest release
    ✔ Extracting latest release
    ✔ Clean up
  ✔ Installing packages
    ✔ Checking node and yarn compatibility
    ✔ Running `yarn install`... (This could take a while)

Thanks for trying out Redwood! We've created your app in '/Users/bill/Sites/supporters-united-rw'

Inside that directory you can run `yarn rw dev` to start the development server.

* Join our Discord server: https://discord.gg/jjSYEQd
* Join our Discourse Community: https://community.redwoodjs.com
* Signup to the Newsletter: https://www.redwoodjs.com
~/Sites» cd supporters-united-rw                                            [9:33:11]
~/Sites/supporters-united-rw» yarn rw dev                                   [9:33:27]
Usage Error: Couldn't find a script named "rw".

Most helpful comment

@peterp oh nice - i'll give that a go.

All 5 comments

I've seen a lot of interesting things coming from yarn2, my major concern is that if we upgrade to yarn2 that it should be backwards compatible with yarn1, since if it wasn't it would break deployments for a bunch of people and installing things like yarn is usually not trivial.

Definitely +1 Peter's comment above.

I think Yarn2 offers benefits overall. However, I attempted an upgrade to yarn2 back in March, which didn't go very well given some major breaking changes. One of the unexpected obstacles is that providers like Netlify didn't support Yarn2 in the build process. That might have changed by now but should definitely be verified before putting much time into this.

Since upgrading to yarn2 sounds potentially backwards incompatible, it's worth mentioning the recent release of npm v7, which includes workspaces

I know redwood relies on yarn workspaces for its concept of "sides", but I'm curious about the yarn requirement / history of that decision. Are there other things yarn offers that make it a better choice than npm?

Cheers!

@kltdwrds I saw this today and also figured that we don't really need yarn anymore. I think it would be fair to try out npm 7 for building the framework to see how that works out.

@peterp oh nice - i'll give that a go.

Was this page helpful?
0 / 5 - 0 ratings