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)

Here is the isolate output with debug logs:

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:

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

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

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.
I have found that the pnpm
patchedDependenciesfrom other workspaces do not work when firebase tries to install the functions.Here is the relevant part of my

pnpm-workspace.ymlwithpatchedDependencies: (note they are all in other dirs, not my firebasefunctionsdir)Here is the isolate output with debug logs:

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:
However, the

pnpm-workspace.ymlfile is copied into the isolate folder with all patches defined.But when firebase tries to install deps during deploy then it fails with the following:

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 ieven in your main dir, not isolate dir.The solution is to either filter the excluded patches from the
patchedDependencieslist in the copiedpnpm-workspace.ymlor simply copy them over always so they can resolve.