Skip to content

pnpm patchedDependencies bug with excluded patch files #178

@ChromeQ

Description

@ChromeQ

I have found that the pnpm patchedDependencies from other workspaces do not work when firebase tries to install the functions.

Here is the relevant part of my pnpm-workspace.yml with patchedDependencies: (note they are all in other dirs, not my firebase functions dir)
Image

Here is the isolate output with debug logs:
Image

You can see it detects the 5 patch files but correctly excludes them as they do not target the "functions" dir.
Confirming they are not in the target dir:
Image

However, the pnpm-workspace.yml file is copied into the isolate folder with all patches defined.
Image

But when firebase tries to install deps during deploy then it fails with the following:
Image

So it can't find the patches and rightly errors. It can be repeated by simply deleting a patch file and trying to run pnpm i even in your main dir, not isolate dir.
The solution is to either filter the excluded patches from the patchedDependencies list in the copied pnpm-workspace.yml or simply copy them over always so they can resolve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions