Skip to content

[How To] Use with yarn2 #60

@elby22

Description

@elby22

When installing ts-patch with Yarn 2 (pnp) I get errors regarding undeclared dependencies for glob and resolve:
Error: ts-patch tried to access glob, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

When I resolve these dependencies using my .yarnrc.yaml file in this way:

packageExtensions:
  "ts-patch@*":
    "dependencies":
      "glob": "*"
      "resolve": "*"
      

I get the following error:
[!] [BackupError]: Error backing up tsc.js - Couldn't create backup directory. EROFS: read-only filesystem, mkdir '/node_modules/typescript/lib-backup'

Is there a way to support Yarn 2 with ts-patch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions