corepack
corepack copied to clipboard
v0.25.0 crashes with ENOENT on fresh install
In a fresh docker container running Corepack crashes with ENOENT
$ docker run --rm -it node:20.11.1 bash -c "npm install -g [email protected] && corepack yarn -v"
Internal Error: ENOENT: no such file or directory, open '/root/.cache/node/corepack/lastKnownGood.json'
Error: ENOENT: no such file or directory, open '/root/.cache/node/corepack/lastKnownGood.json'
Git bisect points to https://github.com/nodejs/corepack/pull/364.
Same issue here. Maybe related to this change in v0.25.0 ?
Yeah, git bisect points to https://github.com/nodejs/corepack/pull/364.
Same issue here on railway.app -- we're seeing a lot of user builds utilizing corepack fail due to this.
Our current workaround is to install the last known good release (0.24.1
):
npm install -g [email protected]
I'm using railway.app with nixpacks and the fix is to create a nixpacks.toml
with this:
[phases.install]
cmds = ["npm install -g [email protected] && corepack enable", "pnpm i --frozen-lockfile"]
dependsOn = ["setup"]
I'm using pnpm i --frozen-lockfile
but you can replace it with the command of your choice.
I have a potential fix: https://github.com/nodejs/corepack/pull/382 If someone could try it out and confirm if it solves the issue, that'd be great.
we ran into this as well. running corepack install --global <yarn-version>
fixes the issue, but we have to run that separately for each user that needs to use yarn.
Thanks for the quick fix aduh95! I'm wondering since this is breaking many peoples CI - when is the plan to release this? I can't do a workaround for my usage of https://docs.renovatebot.com/ as it is a third party tool that depends on this working.
v0.25.2 is out with the fix. Let us know if you're still issues.
Thanks, working great now!
Thanks, it works as expected !
Thanks for the quick fix aduh95! I'm wondering since this is breaking many peoples CI - when is the plan to release this? I can't do a workaround for my usage of https://docs.renovatebot.com/ as it is a third party tool that depends on this working.
You can pin corepack and other tools in such situations https://github.com/renovatebot/renovate/discussions/27465
Works on the brew side. Thanks for the quick fix!
- https://github.com/Homebrew/homebrew-core/pull/163328