Skip to content

Fix: Usage with PNPM on Windows #183

@bestickley

Description

@bestickley

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions