Skip to content

fix: class-transformer doesn't work with vercel edge runtime #1574

Open
@apexguy

Description

@apexguy

Description

Can't use class-transformer for input validation in nextjs edge runtime - Its fails on compilation

Expected behavior

Normal usage of the library

Actual behavior

when running npm run build

./node_modules/class-transformer/esm5/TransformOperationExecutor.js
A Node.js API is used (Buffer at line: 117) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageIssues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions