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

Regression: pnpm link with workspace references fails #6603

Open
thantos opened this issue May 28, 2023 · 10 comments
Open

Regression: pnpm link with workspace references fails #6603

thantos opened this issue May 28, 2023 · 10 comments

Comments

@thantos
Copy link

thantos commented May 28, 2023

pnpm version: 8.6.0

Code to reproduce the issue:

https://github.com/functionless/eventual/blob/main/apps/tests/aws-runtime/scripts/test-create

Test script that links workspace packages over a local install.

Expected behavior:

link should succeed. It succeeded with 8.5.1 and has worked since 6.* at least.

https://github.com/functionless/eventual/actions/runs/5100583453/jobs/9169107938#step:4:23

Actual behavior:

Github action picked up the latest 8.6.0 and now throws this error:

 ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In ../../../../../packages/@eventual/core-runtime: "@eventual/core@workspace:^" is in the dependencies but no package named "@eventual/core" is present in the workspace

https://github.com/functionless/eventual/actions/runs/5104922608/jobs/9176183671?pr=379#step:4:25

Additional information:

  • node -v prints: 18.16.0
  • Windows, macOS, or Linux?: Linux, Github Actions
@thantos
Copy link
Author

thantos commented May 28, 2023

Workaround: Pinning the version sam-goodwin/eventual@41a32f6

@segevfiner
Copy link

Also in v7.33.0

@zkochan
Copy link
Member

zkochan commented Jun 3, 2023

ok, can someone create a smaller repository that reproduces the issue. I don't understand what is happening.

This change might be related: #6598

@kiuKisas
Copy link

kiuKisas commented Jun 7, 2023

I came to this issue because that happen to me in version 7.1.9.
However, after updating to 8.6.1, the error message was:

 ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In : "iris@workspace:*" is in the dependencies but no package named "iris" is present in the workspace

It became clearer that my problem was a bad name in the name field inside the package.json of my package. Updating it solve my issue.

Probably not @thantos issue, but I hope it can help some people and detect false cases.

@ony3000
Copy link

ony3000 commented Sep 25, 2023

Hello @zkochan, although it is slightly different from the pnpm link command case, I created a small repository where you can check for ERR_PNPM_WORKSPACE_PKG_NOT_FOUND.

Steps to reproduce

  1. Clone prettier-plugin-noop repository.
  2. Install dependencies.
  3. Run pnpm run build in the packages/prettier-plugin-noop directory.
  4. Run npm pack in the packages/prettier-plugin-noop directory.
  5. Add the created tarball file path to package.json of the project outside the monorepo.
    (e.g. "prettier-plugin-noop": "file:./prettier-plugin-noop-0.0.0.tgz")
  6. Try to install dependencies from that project.

@RichardJECooke
Copy link

I'm not sure if this is the same error, but I ran npm install -g pnpm;, then tried pnpm install on a client's repository, and I get the error ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In : "@speakeasy/nextra-theme@workspace:*" is in the dependencies but no package named "@speakeasy/nextra-theme" is present in the workspace. Is this this bug, or is there some setup step I need to do after installing pnpm please?

@faiz-gear
Copy link

I'm not sure if this is the same error, but I ran npm install -g pnpm;, then tried pnpm install on a client's repository, and I get the error ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In : "@speakeasy/nextra-theme@workspace:*" is in the dependencies but no package named "@speakeasy/nextra-theme" is present in the workspace. Is this this bug, or is there some setup step I need to do after installing pnpm please?

I got the same error, did you find a way to resolve it?

@ThomasBouasli
Copy link

I came to this issue because that happen to me in version 7.1.9. However, after updating to 8.6.1, the error message was:

 ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In : "iris@workspace:*" is in the dependencies but no package named "iris" is present in the workspace

It became clearer that my problem was a bad name in the name field inside the package.json of my package. Updating it solve my issue.

Probably not @thantos issue, but I hope it can help some people and detect false cases.

What do you mean a name problem? I got the same error.

@shellscape
Copy link
Contributor

@zkochan would be cool to get this one on the priority list. currently preventing me from setting up a proper test environment for CI for jsx-email. Looks like #6603 (comment) provides a solid reproduction.

@cope
Copy link

cope commented May 28, 2024

Just got the same ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In : "@swc/types@workspace:^" is in the dependencies but no package named "@swc/types" is present in the workspace out of the blue after trying to upgrade packages with pnpm latest.

EDIT: Found this, might be related: swc-project/swc#8988

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

No branches or pull requests

10 participants