-
Notifications
You must be signed in to change notification settings - Fork 2.5k
NX No such file or directory (os error 2) - when using the new remote cache from 20.8 #30733
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
Comments
@FrozenPandaz / @AgentEnder I'm happy to work with you guys to debug this. |
Ok, I got it consistently working again, locally. Tracked it to the attached cache tarball. Running the
|
Update: |
Seems to be related to tasks that declare outputs, but none of those outputs are in the cache. For example, jest and vitest declare outputs (coverage directory), but if you run tests without coverage, it won't produce those outputs. "test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
...
"test": {
"executor": "@nx/vite:test",
"outputs": ["{options.reportsDirectory}"], Then, when the cache results are being applied, and it looks for those outputs, which don't exist, it throws that "No such file or directory" error. |
@FrozenPandaz / @AgentEnder / @vsavkin can we please get an update on this? Is there a plan to include a fix, at least before the official v21 launch? |
Hi, yes this needs to be fixed. Its on my list, just tending to some other stuff still too. |
Is this possibly related to #27724 (next.js output: standalone fails with "File exists (os error 17)"), which is still an issue in v21.0.0? Edit: corrected referenced nx version |
@drewandre hard to tell. I've never experienced the problem described in #27724, which seems old. |
Uh oh!
There was an error while loading. Please reload this page.
Current Behavior
Sometimes, when running tasks (happened with
test
andbuild
), it fails with:Expected Behavior
Target runs normally
GitHub Repo
No response
Steps to Reproduce
NX_SELF_HOSTED_REMOTE_CACHE_SERVER
to a remote cache server. E.g. this oneGot this failure locally (macos) semi-consistently with a next.js app and a large
.next/cache
folder indist
.It went away after I cleaned up all the cache:
find apps -type d -path "*\.next/cache*" | xargs rm -rf
rm -rf node_modules/.cache
rm -rf .nx
nx reset
But it's now happening on CI.
Nx Report
Failure Logs
Package Manager Version
[email protected]
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: