I have a custom dependency that has a bin script registered in the package.json:
//bin part of package json
"bin": {
"test123": "./scripts/testtest.js"
}
This script simply makes a console.log.
In my libary I can execute the script with yarn run test123
, which prints my console.log output.
Now I implement my library in a project and simply register the latest version in my package.json.
With yarn 2 I now want to run the script from the terminal in my project. How can I do that? I'm using yarn plug n play, so no node_modules folder.
If I do yarn info @my/library
I even can see that the binary is exposed. So I expect yarn dlx @my/library test123
should work. But I get the error
Binary not found (library) for root-workspace-0b6124
(where "library in that error is part behind the / in @my/library)