Open bsgrigorov opened 4 weeks ago
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.
@m8xp0w3r yeah this was my solution too
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.
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.
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:"
}
}
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