ojkelly/yarn.build

Couldn't find a script named "build"

Closed this issue · 4 comments

Describe the bug
Just added the plugin to a new project via yarn plugin import https://yarn.build/latest.
Executing yarn build results only in the error

Usage Error: Couldn't find a script named "build".

This workflow did work a few day ago on different projects. I assume the problem was introduced in the recently published version 3.0.0.

To Reproduce
Steps to reproduce the behavior:

  1. run yarn plugin import https://yarn.build/latest
  2. run yarn build
  3. See error

Expected behavior
All build scripts should be executed

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • yarn 2.4.2
  • node 14.17.2

Workaround is to use the older version via

yarn plugin import https://github.com/ojkelly/yarn.build/releases/download/v0.9.56/plugin-build.js

The readme specifies that to install for Yarn 2.x you should run

yarn plugin import https://yarn.build/v2

https://github.com/ojkelly/yarn.build/tree/8e296bf95275b7051d61128d119505121bd8d9cb#yarnbuild

Oh stupid me, realizing it might have to do something with the new version, but not checking for new instructions. Maybe this issue will help someone else.

Thanks for the quick response and sorry for the trouble.

Thanks for working this one out. Yep as Yarn v3 is coming soon, the I've moved v2 compatibility to /v2.

If you jump into https://github.com/ojkelly/yarn.build/blob/trunk/netlify.toml#L15 you'll see /v2 currently it maps to release v0.9.56.

And all the Yarn 3 releases are now tagged with a matching major version v3.x.x as this plugin has reached a decent point of maturity that we can provide some semver guarantees.