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

Only check packageManager if it actually specifies pnpm #143

Closed
wants to merge 3 commits into from

Conversation

fkorotkov
Copy link

We upgrade to version 4 and started seeing the following weird error:

Error: Multiple versions of pnpm specified:
  Error: Error: Multiple versions of pnpm specified:
    - version 9 in the GitHub Action config with the key "version"
    - version yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e in the package.json with the key "packageManager"
  Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION
    - version 9 in the GitHub Action config with the key "version"
    - version yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e in the package.json with the key "packageManager"

Even though we don't specify packageManager in package.json explicitly.

Either way this change seems like an improvement to do pnpm version validation only if it's actually pnpm.

We upgrade to version 4 and started seeing the following weird error:

```
Error: Multiple versions of pnpm specified:
  Error: Error: Multiple versions of pnpm specified:
    - version 9 in the GitHub Action config with the key "version"
    - version yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e in the package.json with the key "packageManager"
  Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION
    - version 9 in the GitHub Action config with the key "version"
    - version yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e in the package.json with the key "packageManager"
```

Even though we don't specify `packageManager` in `package.json` explicitly.

Either way this change seems like an improvement to do `pnpm` version validation only if it's actually `pnpm`.
@zkochan
Copy link
Member

zkochan commented Aug 23, 2024

Even though we don't specify packageManager in package.json explicitly.

I don't understand, if you don't have the field in package.json, how do you get the error?

@fkorotkov
Copy link
Author

Found the issue. There was some problem with a working dir.

@fkorotkov fkorotkov closed this Aug 24, 2024
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

Successfully merging this pull request may close these issues.

2 participants