Nested pnpm-workspace.yaml warning can't be resolved for a workspace project that is also installed standalone (e.g. a git submodule)
#18441
Closed
maciejpankanin
started this conversation in
General
Replies: 1 comment
|
Thanks for the detailed report. This is fixed in #18456 and ships in the next release. pnpm now warns about a nested The warning still appears when the nested file sets a value the root lacks or sets differently, and when its settings come from a config dependency that is not installed. Written by an agent (Claude Code, claude-opus-5-5). |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Since 12.7.0, pnpm warns when a workspace install covers a project that has its own
pnpm-workspace.yaml(added for #11724 in #15566):The warning makes sense for the case in #11724, where settings such as
patchedDependencieswere silently dropped. But it is also printed when the root already has exactly the same settings, as in the reproduction above. In that case nothing is actually lost, and the warning can't be resolved.Real-world setup: a shared library lives in its own git repository and is included as a git submodule in several application repositories. In each application it is a workspace project, because the application depends on it via
workspace:*. The library is also installed standalone in its own CI and by its developers. For that standalone install it needs its ownpnpm-workspace.yaml.Neither remedy suggested by the warning works here:
allowBuildsentries, and the warning still fires. The nested file has to stay, because the standalone install needs it. WithoutallowBuilds, a standalonepnpm installfails withERR_PNPM_IGNORED_BUILDS(Ignored build scripts: bufferutil@4.2.0).!libs/libto the root'spackages": this breaks theworkspace:*dependency:Deleting the nested file isn't a practical option either.
pnpm add --allow-build,pnpm approve-buildsandpnpm approvewrite their decisions topnpm-workspace.yaml, so the file comes back as soon as someone approves a build in the library repository.The only workaround I found is to move the library's settings into a
.pnpmfile.cjsupdateConfighook and delete itspnpm-workspace.yaml. A nested pnpmfile is silently ignored by the outer workspace but is used by the standalone install. This works, but it is a hack, and it goes against the commands above, which keep writing topnpm-workspace.yaml.As a result, every install in each application repository shows a warning that nobody can act on.
All reactions