Skip to content

Type Augmentation does not work in pnpm workspace monorepo #334

@onlywei

Description

@onlywei

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

5.6.2

Plugin version

11.0.2

Node.js version

24.11.1

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

15.5

Description

Using this plugin within a pnpm workspace monorepo does not properly augment the types on fastify's Request object.

In a standalone single package repo, it works fine, but as soon as workspaces is introduced, it fails.

Please look at the README in the linked repo to see the error.

Link to code that reproduces the bug

https://github.com/onlywei/repro-fastify-plugins-esm-ts

Expected Behavior

No type errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions