Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.25.0 crashes with ENOENT on fresh install #379

Closed
merceyz opened this issue Feb 20, 2024 · 12 comments · Fixed by #382
Closed

v0.25.0 crashes with ENOENT on fresh install #379

merceyz opened this issue Feb 20, 2024 · 12 comments · Fixed by #382

Comments

@merceyz
Copy link
Member

merceyz commented Feb 20, 2024

In a fresh docker container running Corepack crashes with ENOENT

$ docker run --rm -it node:20.11.1 bash -c "npm install -g corepack@0.25.0 && 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 #364.

@devj3ns
Copy link

devj3ns commented Feb 20, 2024

Same issue here. Maybe related to this change in v0.25.0 ?

@merceyz
Copy link
Member Author

merceyz commented Feb 20, 2024

Yeah, git bisect points to #364.

@half0wl
Copy link

half0wl commented Feb 20, 2024

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 corepack@0.24.1

@nikolalsvk
Copy link

I'm using railway.app with nixpacks and the fix is to create a nixpacks.toml with this:

[phases.install]
cmds = ["npm install -g corepack@0.24.1 && 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.

@aduh95
Copy link
Contributor

aduh95 commented Feb 20, 2024

I have a potential fix: #382
If someone could try it out and confirm if it solves the issue, that'd be great.

@ajw725
Copy link

ajw725 commented Feb 20, 2024

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.

latin-1 added a commit to neetly/renovate-config that referenced this issue Feb 21, 2024
@ntucker
Copy link

ntucker commented Feb 21, 2024

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.

@aduh95
Copy link
Contributor

aduh95 commented Feb 21, 2024

v0.25.2 is out with the fix. Let us know if you're still issues.

@ntucker
Copy link

ntucker commented Feb 21, 2024

Thanks, working great now!

@Elantest
Copy link

Thanks, it works as expected !

@secustor
Copy link

secustor commented Feb 21, 2024

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 renovatebot/renovate#27465

@chenrui333
Copy link

Works on the brew side. Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants