Closed ianldgs closed 8 months ago
@AgentEnder / @FrozenPandaz any comment on this? Is anyone gonna work on a fix soon? Maybe for v17? If not, can you please suggest a fix that I can implement? This is blocking us from upgrading. Stuck in 16.3; next working version would be 16.4, but we had other issues in that version that were fixed later on.
@Cammisuli maybe you have some insight, as the author of https://github.com/nrwl/nx/pull/17638?
This is an interesting scenario.. Let me discuss this with a few others. Just for my knowledge, what would you do when things are restored from the remote cache / Nx Cloud?
This is an interesting scenario.. Let me discuss this with a few others. Just for my knowledge, what would you do when things are restored from the remote cache / Nx Cloud?
We build a docker image by copying the output on dist/apps/my-project
.
The advantage here is that we don't need to run pnpm install
in the Dockerfile of each app, since all dependencies are already downloaded and bundled.
But good to know about this limitation. Not sure what else can be broken without symlink support.
We have the same problem (described here https://stackoverflow.com/questions/77627408/does-nx-support-caching-symbolic-links) and also think that this should be supported again (I found this issue after creating the question in stackoverflow).
This is acts as quite blocker to next.js developers. nx cache should be able to restore same build artifacts. I know nx team has busy days, but is there any plan to solve this problem? Seems like this issue is staled @Cammisuli
Any updates? We're blocked currently because our current Next standalone is copying the files and not the symlinks
@AgentEnder @FrozenPandaz any comment on this?
@FrozenPandaz
Wow, this bug has finally been fixed. I was having a hard time because of this issue, but I'm so grateful that it's been resolved.
Omg it FIXED!!! thanks @FrozenPandaz
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Symlinks are not restored when cache is used:
❯
ls -lah dist/apps/my-project/.next/standalone/node_modules/
Expected Behavior
When cache is used, symlinks should also be restored:
❯
ls -lah dist/apps/my-project/.next/standalone/node_modules/
GitHub Repo
No response
Steps to Reproduce
nx build my-project --skip-nx-cache
rm -rf dist/apps/my-project/
nx build my-project
nx docker my-project
(https://github.com/gperdomor/nx-tools/tree/main/packages/nx-container)docker run my-registry/my-project
Nx Report
Failure Logs
This causes problems with module resolution when running the production docker build of the application:
Package Manager Version
Tried with pnpm@7.24.3 and pnpm@8.8.0
Operating System
Additional Information
The offending change seems to be https://github.com/nrwl/nx/pull/17638.
copy
doesn't usenode:fs-extra
anymore: https://github.com/nrwl/nx/pull/17638/files#diff-487f8cf4d7fba58c204044696a570374a67661d9489b2e9a6182689e411ecb23R168it calls
copy_items
from rustfs_extra
crate: https://github.com/nrwl/nx/pull/17638/files#diff-663ac081b66b48c93df5278df020d105321ea28dc22e143efcbad9888727d153R22.which doesn't seem to support symlinks: https://github.com/webdesus/fs_extra/issues/15