Yarn PnP fallback mode and scripts

29 views Asked by At

I am using pnpFallbackMode: all and specify some common dev dependencies in the package root, then I am using yarn workspaces for my components.

I am able to resolve package dependencies defined in the root this way, but I am unable to run tools.

For example, when defining TypeScript as a dev dependency in the root package.json, I get

$ yarn tsc
Usage Error: Couldn't find a script named "tsc".

Is there a way to solve this?

Background

I know I can list the dependency specifically, but I cannot list it without version as far as I know. Listing version in every component breaks dependabot because of issues like https://github.com/dependabot/dependabot-core/issues/2178 so this is not an option for me.

Also, I know I can turn off PnP or switch to another package manager like pnpm. This is not this question, my question is if it is possible to solve while using yarn pnp.

0

There are 0 answers