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

Fix: Usage with PNPM on Windows #183

Open
bestickley opened this issue Dec 11, 2023 · 0 comments · May be fixed by #192
Open

Fix: Usage with PNPM on Windows #183

bestickley opened this issue Dec 11, 2023 · 0 comments · May be fixed by #192
Milestone

Comments

@bestickley
Copy link
Contributor

bestickley commented Dec 11, 2023

Problem

When using cdk-nextjs with PNPM on windows, the deployment succeeds but server fails with 500 because it cannot find "next" package. This is because PNPM uses symlinks and the during deployment, cdk-nextjs uses Compress-Archive powershell commandlet which doesn't support symlinks.

Solution

Use fs.cpSync with dereference: true to get rid of symlinks and copy to a temporary location. Then use built in CDK Asset construct to upload.

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.

1 participant