Repository navigation
[BUG] Unable to install 11.1.0 with corepack #8075
Copy link
Copy link
Closed
ctrlplanedev/ctrlplane
#297Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
We have tried with the the docker 22 release as well as locally but running:
corepack prepare npm@latest --activate
or
corepack prepare npm@v11.1.0 --activate
both fail with the same following error:
Preparing npm@v11.1.0 for immediate activation...
Internal Error: Cannot find matching keyid: {"signatures":[{"sig":"MEYCIQCKqkTMp8Lr/s6dqmOOdG9bdpCWzPLUL3typxXxDW1gFwIhANdhRHLzpYGy2An4pE+1amOBppTlN1oqN72/PEzSZN1M","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
at verifySignature (/home/christian/.local/share/fnm/node-versions/v22.12.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47)
at installVersion (/home/christian/.local/share/fnm/node-versions/v22.12.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:21882:7)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Engine.ensurePackageManager (/home/christian/.local/share/fnm/node-versions/v22.12.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:22310:32)
at async PrepareCommand.execute (/home/christian/.local/share/fnm/node-versions/v22.12.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:23019:27)
at async PrepareCommand.validateAndExecute (/home/christian/.local/share/fnm/node-versions/v22.12.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:19835:22)
at async _Cli.run (/home/christian/.local/share/fnm/node-versions/v22.12.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:20772:18)
at async Object.runMain (/home/christian/.local/share/fnm/node-versions/v22.12.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:23091:19)
Expected Behavior
No error
Steps To Reproduce
- Ensure you have Node 22 installed
- run
fnm exec corepack prepare npm@v11.1.0 --activate
Environment
- npm: 10.9.0
- node: v22.12.0
- OS Name: Linux Mint
- npm config:
; node bin location = /home/christian/.local/share/fnm/node-versions/v22.12.0/installation/bin/node
; node version = v22.12.0
; npm local prefix = /home/christian/projects/test
; npm version = 10.9.0
; cwd = /home/christian/projects/test
; HOME = /home/christian
; Run `npm config ls -l` to show all defaults.
; "default" config from default values
_auth = (protected)
access = null
all = false
allow-same-version = false
also = null
audit = true
audit-level = null
auth-type = "web"
before = null
bin-links = true
browser = null
ca = null
cache = "/home/christian/.npm"
cache-max = null
cache-min = 0
cafile = null
call = ""
cert = null
cidr = null
color = true
commit-hooks = true
cpu = null
depth = null
description = true
dev = false
diff = []
diff-dst-prefix = "b/"
diff-ignore-all-space = false
diff-name-only = false
diff-no-prefix = false
diff-src-prefix = "a/"
diff-text = false
diff-unified = 3
dry-run = false
editor = "vi"
engine-strict = false
expect-result-count = null
expect-results = null
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
fetch-timeout = 300000
force = false
foreground-scripts = false
format-package-lock = true
fund = true
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "/home/christian/.local/share/fnm/node-versions/v22.12.0/installation/etc/npmrc"
heading = "npm"
https-proxy = null
if-present = false
ignore-scripts = false
include = []
include-staged = false
include-workspace-root = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "/home/christian/.npm-init.js"
init-version = "1.0.0"
init.author.email = ""
init.author.name = ""
init.author.url = ""
init.license = "ISC"
init.module = "/home/christian/.npm-init.js"
init.version = "1.0.0"
install-links = false
install-strategy = "hoisted"
json = false
key = null
legacy-bundling = false
legacy-peer-deps = false
libc = null
link = false
local-address = null
location = "user"
lockfile-version = null
loglevel = "notice"
logs-dir = null
logs-max = 10
; long = false ; overridden by cli
maxsockets = 15
message = "%s"
node-options = null
noproxy = [""]
npm-version = "10.9.0"
offline = false
omit = []
omit-lockfile-registry-resolved = false
only = null
optional = null
os = null
otp = null
pack-destination = "."
package = []
package-lock = true
package-lock-only = false
parseable = false
prefer-dedupe = false
prefer-offline = false
prefer-online = false
prefix = "/home/christian/.local/share/fnm/node-versions/v22.12.0/installation"
preid = ""
production = null
progress = true
provenance = false
provenance-file = null
proxy = null
read-only = false
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
replace-registry-host = "npmjs"
save = true
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-peer = false
save-prefix = "^"
save-prod = false
sbom-format = null
sbom-type = "library"
scope = ""
script-shell = null
searchexclude = ""
searchlimit = 20
searchopts = ""
searchstaleness = 900
shell = "/bin/bash"
shrinkwrap = true
sign-git-commit = false
sign-git-tag = false
strict-peer-deps = false
strict-ssl = true
tag = "latest"
tag-version-prefix = "v"
timing = false
umask = 0
unicode = true
update-notifier = true
usage = false
user-agent = "npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}"
userconfig = "/home/christian/.npmrc"
version = false
versions = false
viewer = "man"
which = null
workspace = []
workspaces = null
workspaces-update = true
yes = null
; "cli" config from command line options
long = true
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps
Activity
LucienLeMagicien commentedon Jan 31, 2025
Relevant/related issues:
cannot find matching keyidpnpm/pnpm#9014See also this nodejs/corepack#616 (comment) for the rundown. In particular:
You can manually update corepack by running
npm install -g corepack@latest.(If you'd rather "install it using knowledge of the release's hash", see his other comment here: nodejs/corepack#612 (comment) : run
npm view npm@11.1.0 dist.shasumto get the hash.)MikeMcC399 commentedon Jan 31, 2025
@jensenbox
You can use the same principle I found for pnpm. The following should unblock you:
I'm completely new to this. So this really is just peer-to-peer support!
wraithgar commentedon Jan 31, 2025
This not a bug w/ npm it was an issue w/ corepack. The newest version of corepack was updated and can now validate things signed w/ the latest npm registry key.
fix: Manually grab latest corepack (#297)
djakielski commentedon Feb 3, 2025
It's also happening on npm version 20
MikeMcC399 commentedon Feb 3, 2025
@djakielski
There is no npm version 20. Perhaps you mean Node.js 20?
Are you asking for help or just reporting your issue?
troyere commentedon Feb 3, 2025
Same here by using nvm, node 22.13.1 in
.nvmrc, and pnpm 9.15.5 inpackage.json:MikeMcC399 commentedon Feb 3, 2025
@troyere
MikeMcC399 commentedon Feb 3, 2025
@ricardo-rumble
This has the same root cause as the issue installing npm@11.1.0 with Corepack, however you are in the wrong issue list if your problem is with pnpm installation with Corepack.
I have however seen other users working around the issue in Docker with
apichai1moby commentedon Feb 3, 2025
corepack enable && corepack prepare pnpm@9.15.2 --activate
It's work!!!
ci(quality): corepackでエラーが出る問題を修正
ci(quality): corepackでエラーが出る問題を修正
uday-octanom commentedon Feb 3, 2025
Thanks @apichai1moby, I was able to resume my deployment coz of this.
build(ui): Pin the PNPM version to 9.15.4
fix(analyzer): Pin the PNPM to version 9.15.4
0ctothorp commentedon Feb 3, 2025
You can also store your preferred pnpm version in package.json:
Then in the CI script:
This way, you'll always use the same version of pnpm locally and on your CI.
build(ui): Pin the PNPM version to 9.15.4
fix(analyzer): Pin the PNPM to version 9.15.4
ymolists commentedon Feb 3, 2025
Hi folks.
For use folks running nixos whats the correct way to solve this ? i am getting a read only file system when i do corepack enable
MikeMcC399 commentedon Feb 3, 2025
@ymolists
That is quite a different issue and you should probably be asking your question in a separate issue in the https://github.com/nodejs/corepack/issues list to see if Corepack is supported in a NixOS environment, which is quite special. Or check the NixOS issues for guidance.
duc-hoang-161 commentedon Feb 3, 2025
jerohero commentedon Feb 7, 2025
npm i -g corepackfixed it for meci: fix FE Dockerfile with workaround