Skip to content

[Bug]: Typescript-patch cannot resolve type declarations inside workspaces #3780

@sushruth

Description

@sushruth

Self-service

  • I'd be willing to implement a fix

Describe the bug

Type declarations do not work in yarn workspaces, even when types are installed both in workspace's package.json and root's package.json. This is true for both tsc and tsserver. See example repo here - https://github.com/sushruth/yarn-workspaces-ts-bug

This is how the error looks -

image

Somehow compile and declaration emit succeeds but the above error is shown.

To reproduce

NA

Environment

`envinfo` breaks on windows 11 (since `wmic` cli is no longer present). Could not collect this information.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions