Yarn berry workspace command not available at root level

1.4k Views Asked by At

I have a working monorepo(yarn v1) with lot of workspaces(small example below). I'm working on upgrading yarn to Yarn@3 berry. I'm not able to access "Client" package .bin scripts from monorepo root, giving me this error "Usage Error: Couldn't find a script named helloworld" where as this worked in yarn v1. Is there a way to make "helloworld" work from anywhere in the monorepo like "yarn helloworld".

works:
yarn workspace Client helloworld

Fails:
yarn helloworld
Usage Error: Couldn't find a script named "helloworld".

Example:
--package.json
--node_modules/
--shared/
    |--client/
       |--package.json
       |--node_modules/
    |--server/
       |--package.json
       |--node_modules/
1

There are 1 best solutions below

0
On