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

[Bug]: Cannot install packages with pnpm v9 #4901

Closed
andershagbard opened this issue Nov 21, 2024 · 10 comments · Fixed by #4931
Closed

[Bug]: Cannot install packages with pnpm v9 #4901

andershagbard opened this issue Nov 21, 2024 · 10 comments · Fixed by #4931
Labels
Type: Bug Something isn't working

Comments

@andershagbard
Copy link

andershagbard commented Nov 21, 2024

Getting this error when running pnpm install in the main branch.

ERR_PNPM_NO_MATCHING_VERSION  No matching version found for @shopify/[email protected]

This error happened while installing a direct dependency of /Users/anderssogaard/Projects/shopify-cli/packages/app

The latest release of @shopify/theme is "3.58.2".
@andershagbard andershagbard added the Type: Bug Something isn't working label Nov 21, 2024
@andershagbard andershagbard changed the title [Bug]: <YOUR ISSUE TITLE> [Bug]: Cannot install packages Nov 21, 2024
@andershagbard
Copy link
Author

It's not just @shopify/theme, which has an incorrect version. There are a few others.

I am also getting this error, which seems to be a blocker for community contributions.

@shopify/ui-extensions-test-utils is not in the npm registry, or you have no permission to fetch it.

@gonzaloriestra
Copy link
Contributor

Hi! The @shopify/cli package now includes theme and ui-extensions-test-utils, so you only need that one.

You can find more information here: https://shopify.dev/docs/apps/build/cli-for-apps#switch-to-a-global-executable-or-local-dependency

@andershagbard
Copy link
Author

@gonzaloriestra It is still not fixed.

Steps to replicate:

  1. Forge this (https://github.com/Shopify/cli) repository
  2. Run pnpm install

@gonzaloriestra
Copy link
Contributor

It works for me. Could you share the output?

  • git clone https://github.com/Shopify/cli
  • cd cli
  • pnpm install

@andershagbard
Copy link
Author

andershagbard commented Nov 27, 2024

Getting this error following your exact steps. Could you have some Shopify exclusive npm token? Because 3.70.0 is not released on npmjs

ERR_PNPM_NO_MATCHING_VERSION  No matching version found for @shopify/[email protected]

This error happened while installing a direct dependency of /Users/anderssogaard/Desktop/cli/packages/cli

The latest release of @shopify/app is "3.58.2".

Other releases are:
  * experimental: 0.0.0-experimental-20240411124555
  * nightly: 0.0.0-nightly-20240413160158

If you need the full list of all 694 published versions run "$ pnpm view @shopify/app versions".
Progress: resolved 100, reused 98, downloaded 1, added 0

@gonzaloriestra
Copy link
Contributor

Oops, you are right. Let us investigate...

@andershagbard
Copy link
Author

Keep in mind it's the unreleased versions, and @shopify/ui-extensions-test-utils not registered at all on npmjs. Maybe more

@gonzaloriestra
Copy link
Contributor

Are you using pnpm v9? I think that's the issue. It only works with v8 for now, as explained here.

We are not releasing other packages than cli, because that one now includes the rest. Pnpm must take the dependencies locally, and that only works with v8.

@andershagbard
Copy link
Author

andershagbard commented Nov 27, 2024

Makes sense. I think this can be fixed by adding link-workspace-packages=true to .npmrc then.

This works for pnpm 9. I have not tested other versions or package managers.

@gonzaloriestra gonzaloriestra changed the title [Bug]: Cannot install packages [Bug]: Cannot install packages with pnpm v9 Nov 27, 2024
@gonzaloriestra gonzaloriestra mentioned this issue Nov 27, 2024
5 tasks
@gonzaloriestra
Copy link
Contributor

Thanks for the suggestion! 👏

I've created a PR to enable it, so PNPM v9 is also compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants