Skip to content

PNPM warning about configuration in a Nx repo #490

Answered by agdimech
zetashift asked this question in Q&A
Discussion options

You must be logged in to vote

This seems to be due to how projen renders resolutions: https://github.com/projen/projen/blob/bdec85e18b6ec1043ef64816638741e4abeb2b6b/src/javascript/node-package.ts#L1357C37-L1357C43

In the current implementation all pnpm projects will have at a minimum a pnpm field. If resolutions are present then they will be rendered. This could be fixed by changing Projen's implementation to only render a pnpm field if overrides exist, however I don't think the effort is worth it just to remove a warning although completely your call :)

Another option I just thought of is you could actually just remove the pnpm fields by modifying the package.json of each subproject i.e:

monorepoProject.subprojects
 …

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@zetashift
Comment options

Comment options

You must be logged in to vote
2 replies
@zetashift
Comment options

@agdimech
Comment options

Answer selected by zetashift
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants