Corepack and pnpm@10.2.0 failing on build

No matter what I do, I can’t seem to get pnpm v10 working with netlify - keep getting this corepack error

9:27:04 PM: Enabling Node.js Corepack
9:27:04 PM: Started restoring cached build plugins
9:27:04 PM: Finished restoring cached build plugins
9:27:04 PM: WARNING: The environment variable 'NODE_ENV' is set to 'production'. Any 'devDependencies' in package.json will not be installed
9:27:04 PM: Started restoring cached corepack dependencies
9:27:04 PM: Finished restoring cached corepack dependencies
9:27:05 PM: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-10.2.0.tgz
9:27:05 PM: /opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:21535
9:27:05 PM:   if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`);
9:27:05 PM:                                               ^
9:27:05 PM: Error: Cannot find matching keyid: {"signatures":[{"sig":"MEQCIBfxS9RKPsi46jxBHnsGYQ03mg8um110415vE6KRCzY8AiBvik66sYxJ/NyCovwJSbDuuoaYCxc7EVdFhaaciIXjTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
9:27:05 PM:     at verifySignature (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47)
9:27:05 PM:     at installVersion (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:21882:7)
9:27:05 PM:     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
9:27:05 PM:     at async Engine.ensurePackageManager (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:22316:32)
9:27:05 PM:     at async Engine.executePackageManagerRequest (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:22416:25)
9:27:05 PM:     at async Object.runMain (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:23102:5)
9:27:05 PM: Node.js v22.13.1
9:27:05 PM: /opt/build-bin/run-build-functions.sh: line 232: [: : integer expression expected
9:27:05 PM: pnpm workspaces detected
9:27:05 PM: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-10.2.0.tgz
9:27:06 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
9:27:06 PM: /opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:21535
9:27:06 PM:   if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`);
9:27:06 PM:                                               ^
9:27:06 PM: Error: Cannot find matching keyid: {"signatures":[{"sig":"MEQCIBfxS9RKPsi46jxBHnsGYQ03mg8um110415vE6KRCzY8AiBvik66sYxJ/NyCovwJSbDuuoaYCxc7EVdFhaaciIXjTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
9:27:06 PM:     at verifySignature (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47)
9:27:06 PM:     at installVersion (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:21882:7)
9:27:06 PM:     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
9:27:06 PM:     at async Engine.ensurePackageManager (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:22316:32)
9:27:06 PM:     at async Engine.executePackageManagerRequest (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:22416:25)
9:27:06 PM:     at async Object.runMain (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:23102:5)
9:27:06 PM: Node.js v22.13.1
9:27:06 PM: Installing npm packages using pnpm version
9:27:06 PM: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-10.2.0.tgz
9:27:06 PM: /opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:21535
9:27:06 PM:   if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`);
9:27:06 PM:                                               ^
9:27:06 PM: Error: Cannot find matching keyid: {"signatures":[{"sig":"MEQCIBfxS9RKPsi46jxBHnsGYQ03mg8um110415vE6KRCzY8AiBvik66sYxJ/NyCovwJSbDuuoaYCxc7EVdFhaaciIXjTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
9:27:06 PM:     at verifySignature (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47)
9:27:06 PM:     at installVersion (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:21882:7)
9:27:06 PM:     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
9:27:06 PM:     at async Engine.ensurePackageManager (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:22316:32)
9:27:06 PM:     at async Engine.executePackageManagerRequest (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:22416:25)
9:27:06 PM:     at async Object.runMain (/opt/buildhome/.nvm/versions/node/v22.13.1/lib/node_modules/corepack/dist/lib/corepack.cjs:23102:5)
9:27:06 PM: Node.js v22.13.1
9:27:06 PM: Error during pnpm install
9:27:06 PM: Failing build: Failed to install dependencies
1 Like

Hey Paul, looks like you sent in a ticket to our help desk about this! We’ll take care of it for you there. Thank you!

1 Like

got the exact same problem, also sending a ticket… corepack really fuckit up with this =/

Hi @Makio64 We’ve received your help desk ticket and will be in touch shortly! Thank you.

Thank you @charlottechhum

updating to node 23.7.0 the corepack will be 0.31.0 and should be work

1 Like

Hi @rafaelsachetto

I tried doing the same but if I am not mistaken upgrading node to 23.7.0 breaks @types/node in my project. For now using npm instead of pnpm fixes the issue and lets me deploy to netlify.

Would love to hear if this is in fact the case or if something else might be the issue on my end.

I have the same problem. I found if I remove packageManager from package.json, then it will build on Netlify. But, the issue with that is that it breaks my GitHub actions because it doesn’t know which version of PNPM to use. I for one do not use Corepack, and it all works fine with “packageManager”.
Also of note, Corepack is set to be deprecated: feat: next steps for version management progress by wesleytodd · Pull Request #606 · nodejs/package-maintenance · GitHub and deps: remove corepack by darcyclarke · Pull Request #51981 · nodejs/node · GitHub

COREPACK_INTEGRITY_KEYS=0 also works in your env vars
Verified when using: "packageManager": "pnpm@10.2.1",

2 Likes

Wow, this works… for now lol thank you so much!