Replies: 2 comments 5 replies
-
|
@Mufasa eg: if you have 2 packages in your workspace named pnpm --filter @my-monorepo/pkg-1 add @my-monorepo/pkg-2to add |
Beta Was this translation helpful? Give feedback.
5 replies
-
|
I encountered the same problem, and discovered that it can be solved by simply adding double quote to the package name. |
Beta Was this translation helpful? Give feedback.
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been using npm for many years and have now started to move over to use pnpm. My initial feedback on pnpm is that it is indeed far superior to npm and I absolutely love it. However, I have spotted a strange issue which I have described below.
When I add a workspace dependency using
pnpm add myWorkspaceLibA --workspace --filter myWorkspaceLibB, pnpm generates this inmyWorkspaceLibB'spackage.jsonfile:It also generates this in the root
pnpm-lock.yamlfile:From the various articles and videos that I have seen on this, I understand that after running the
pnpm addcommand I should change thepackage.jsonentry inmyWorkspaceLibBto:in order to ensure that it always picks up the latest version of
myWorkspaceLibAin my monorepo.However, this leaves the
pnpm-lock.yamlfile inconsistent with thepackage.jsonfile.I have the following questions on this:
pnpm-lock.yamlfile to make it consistent with thepackage.jsonfile?My gut feeling tells me that it is not a good idea for me to be manually changing the
pnpm-lock.yamlfile. I would therefore like to suggest that thepnpm addcommand be enhanced in some way so that it automagically setsworkspace:*in both thepackage.jsonandpnpm-lock.yamlfiles.Is this a reasonable request or have I misunderstood something here?
Beta Was this translation helpful? Give feedback.
All reactions