You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 usesCompress-Archive
powershell commandlet which doesn't support symlinks.Solution
Use
fs.cpSync
withdereference: true
to get rid of symlinks and copy to a temporary location. Then use built in CDK Asset construct to upload.The text was updated successfully, but these errors were encountered: