jetbridge / jetbridge/cdk-nextjs

Fix: Usage with PNPM on Windows

Open
#183 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
362
Forks
50
PR merge metrics
No merged PRs in 30d

Description

## 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.