Skip to content

Measuring text for the purpose of rendering badges fails on Vercel #1601

@wojtekmaj

Description

@wojtekmaj

Describe the bug

On local machine, /api/registry/badge/version/react-pdf?label=wwwwwwwwwwww or iiiiiiiiiiii most likely will render correctly:

Image

Image

On Vercel, measuring text with canvas is crashing, resulting in inaccurate fallback measurements:

Image

Image

Additional context

No response

Logs

No logs, which is exactly why it's so hard to debug for me personally

Metadata

Metadata

Assignees

No one assigned

    Labels

    backServer, Data

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions