You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a yarn workspace with several packages (one per project) and a zero install PNP strategy enabled.
Now we are migrating our CI build to NIX, and one thing that comes in naturally is that you try to sandbox each project's build as much as possible and limit its inputs as much as possible.
This means that for each build job, we copy in the shared files in the workspace root & just the one package directory that is being built.
Now, the problem is, that yarn breaks down with an error Usage Error: Couldn't find foo in the currently installed PnP map where foo is declared in the copied-in project dependencies & certainly is installed in the cache.
Running yarn why foo in the sandbox correctly reports that it is installed and that it's because the package in question declares it as a dependency.
Nonetheless, I do get the error any time I try to run anything through yarn that touches that packages (for example yarn workspaces foreach run xxx).
Is an expected behavior and/or a known bug, that omitting some workspace packages breaks the PnP map checks?
When I run yarn install in the sandbox, I get it working (while also obviously getting a ton of changes since now yarn has more packages than is required), but doesn't make much sense to do since zero install right...
I have “fixed” it for now by copying in the whole packages/ directory instead of being selective, but that obviously results in extraneous work & likely builds too.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have a yarn workspace with several packages (one per project) and a zero install PNP strategy enabled.
Now we are migrating our CI build to NIX, and one thing that comes in naturally is that you try to sandbox each project's build as much as possible and limit its inputs as much as possible.
This means that for each build job, we copy in the shared files in the workspace root & just the one package directory that is being built.
Now, the problem is, that yarn breaks down with an error
Usage Error: Couldn't find foo in the currently installed PnP map
wherefoo
is declared in the copied-in project dependencies & certainly is installed in the cache.Running
yarn why foo
in the sandbox correctly reports that it is installed and that it's because the package in question declares it as a dependency.Nonetheless, I do get the error any time I try to run anything through yarn that touches that packages (for example
yarn workspaces foreach run xxx
).Is an expected behavior and/or a known bug, that omitting some workspace packages breaks the PnP map checks?
When I run
yarn install
in the sandbox, I get it working (while also obviously getting a ton of changes since now yarn has more packages than is required), but doesn't make much sense to do sincezero install
right...I have “fixed” it for now by copying in the whole
packages/
directory instead of being selective, but that obviously results in extraneous work & likely builds too.Some context info:
Beta Was this translation helpful? Give feedback.
All reactions