-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Next.js standalone output broken (again) when remote cached due to missing PNPM symlinks #31085
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
Closed
2 of 4 tasks
Labels
Comments
4 tasks
ianldgs
added a commit
to ianldgs/nx
that referenced
this issue
May 8, 2025
ianldgs
added a commit
to ianldgs/nx
that referenced
this issue
May 9, 2025
AgentEnder
pushed a commit
that referenced
this issue
May 10, 2025
…31138) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior Symlinks in the remote cache tarball are "followed". That modifies the output of Next.js projects using pnpm, causing a restored cache not to work in production. ## Expected Behavior Symlinks are added to the tarball, instead of being followed. I.e. the cache output is not modified. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Should fix #31085.
FrozenPandaz
pushed a commit
that referenced
this issue
May 16, 2025
…31138) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior Symlinks in the remote cache tarball are "followed". That modifies the output of Next.js projects using pnpm, causing a restored cache not to work in production. ## Expected Behavior Symlinks are added to the tarball, instead of being followed. I.e. the cache output is not modified. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Should fix #31085. (cherry picked from commit cbb2619)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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_SELF_HOSTED_REMOTE_CACHE_SERVER
nx build my-project --skip-nx-cache
rm -rf dist/apps/my-project/
nx reset
nx build my-project
dist/apps/my-project
Nx Report
Failure Logs
Error: Cannot find module 'styled-jsx/package.json'
Package Manager Version
pnpm 10.4.0
Operating System
Additional Information
Same as #19502, fix is probably also the same
The text was updated successfully, but these errors were encountered: