{"id":776,"hash":"733502f3fa89c1f142549468b17f88c6d4698cd12a1fcf30f9c30d0af244d463","pattern":"After Heroku restart: pnpm: Error: Cannot find matching keyid","full_message":"My Heroku-hosted node app stopped working this morning at 6am.\n\nIn the Heroku console I found a message \"Dyno restart\" at that time. At the same time, memory usage dropped to 0. Apparently the app did not recover after the restart.\n\nI attempted to just re-run my Github Action deploy workflow to redeploy the app and trigger a restart.\n\nI get the following error:\n\n#11 [prod-deps 1/1] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile\n#11 0.558 /usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21535\n#11 0.558   if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`);\n#11 0.558                                               ^\n#11 0.558 \n#11 0.558 Error: Cannot find matching keyid: {\"signatures\":[{\"sig\":\"MEQCI...\n\nApparently something related to pnpm and corepack.\n\nI found a quick fix by changing my Dockerfile:\n\nFROM node:20-alpine AS base\nENV PNPM_HOME=\"/pnpm\"\nENV PATH=\"$PNPM_HOME:$PATH\"\n# RUN corepack enable                                  # <= removed this\nRUN corepack disable && npm install -g pnpm@latest     # <= added this\nCOPY . /app\nWORKDIR /app\n# ...\n\nThe deployment now works again, the app is back up.\n\nHowever I don't understand the underlying problem:\n\nhow could this suddenly happen?\nis this a legitimate fix?","ecosystem":"npm","package_name":"node.js","package_version":null,"solution":"This answer from Vercel's post worked for me. If you're on Node 18+, you can just install the latest version of corepack before enabling it.\n\nsteps:\n  - name: Use Latest Corepack\n    run: |\n      echo \"Before: corepack version => $(corepack --version || echo 'not installed')\"\n      npm install -g corepack@latest\n      echo \"After : corepack version => $(corepack --version)\"\n      corepack enable\n      pnpm --version\n\nAlso, if you're on Node 16, they say corepack v20 still supports it.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/79411275/after-heroku-restart-pnpm-error-cannot-find-matching-keyid","votes":10,"created_at":"2026-04-19T04:51:41.436086+00:00","updated_at":"2026-04-19T04:51:41.436086+00:00"}