Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to add a new dependency to the project using pnpm #101

Open
henrique-leme opened this issue May 20, 2024 · 4 comments
Open

Comments

@henrique-leme
Copy link

Bug

while trying to add the dependency cpy-cli, i've got the follow error:
image

this happens both on the server folder and the web folder, when I run the follow command: pnpm add -D cpy-cli

Environment info

Windows 10
Node v21.6.1
pnpm v9.1.1
npm v10.5.0

@sibelius
Copy link
Member

sibelius commented Jun 4, 2024

how did you fixed it?

@henrique-leme
Copy link
Author

I didn't actually fixed it, but I closed it cause I doesn't look like a bug, maybe something around permissions, I'm gonna investigate it later today, because I tried to install the same dependency in another project and it worked.

Maybe Eckzzo can clarify it to me

@henrique-leme henrique-leme reopened this Jun 4, 2024
@dantas15
Copy link

it's likely because of pnpm not linking packages from workspace. This happens when link-workspace-packages is set to false (default)

there's a fix:

when you reference a workspace package, for example: apps/web/package.json:36:

"@woovi-playground/tsconfig": "*"

add the workspace: prefix:

"@woovi-playground/tsconfig": "workspace:*"

@dantas15
Copy link

dantas15 commented Jun 28, 2024

alternatively, you can setlink-workspace-packages = true in your ~/.npmrc file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants