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

Support newer versions of pnpm > 8 #65

Open
bsgrigorov opened this issue Aug 15, 2024 · 5 comments
Open

Support newer versions of pnpm > 8 #65

bsgrigorov opened this issue Aug 15, 2024 · 5 comments
Assignees

Comments

@bsgrigorov
Copy link

pnpm version should be configurable like node version.

In a project where pnpm-lock.yaml is already set you should be able to select your pnpm version used in the nx cloud workflow

This should be configurable:

https://github.com/nrwl/nx-cloud-workflows/blob/main/workflow-steps/install-node/main.js#L67

@m8xp0w3r
Copy link

This would be awesome. Spend more than an hour to get CI in a new project running. Solution was deleting lock file and run npx pnpm@8 install afterward to generate a lockfile with version 6. Then I downgraded pnpm to version 8.15.9.

@bsgrigorov
Copy link
Author

@m8xp0w3r yeah this was my solution too

@webfinesse
Copy link

I also ran into this as well. I converted my package.json file to use the new workspaces and catalog features that were added in v9.5 only to find that the builds no longer run in nx cloud.

@barbados-clemens
Copy link
Contributor

barbados-clemens commented Sep 5, 2024

Hi folks, the base images provided by Nx Cloud has corepack enabled, so you should be able to set pnpm version via packageManager field in the package.json (https://nodejs.org/api/packages.html#packagemanager)

pnpm v8 is just the fallback value if one isn't predefined with corepack.
that being said we'll work on publishing a new image with v9 of pnpm as the default. as previously nx has issues with pnpm v9 which is why we kept it to v8 after the v9 release of pnpm.

@webfinesse
Copy link

Thanks for taking the time to respond. This got me unblocked. In case it's any help here is an example package.json with pnpm 9 that runs on the agents.

{
  "scripts": {
    "preinstall": "npx only-allow pnpm"
  },
  "packageManager": "pnpm@9.9.0",
  "dependencies": {
    "@monodon/rust": "catalog:"
  },
  "devDependencies": {
    "@nx/eslint": "catalog:",
    "@nx/web": "catalog:",
    "@nx/workspace": "catalog:",
    "@vitest/ui": "catalog:",
    "eslint": "catalog:",
    "nx": "catalog:",
    "qwik-nx": "catalog:",
    "vite": "catalog:",
    "vitest": "catalog:",
    "typescript": "catalog:"
  }
}

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

4 participants