Error while building Pages Functions from monorepo (nx): Could not resolve
I have a monorepo that contains a Pages project and a library that the Pages _worker.js function depends on. During the CF build I get the following error (which works fine locally).
22:20:45.746 > build:functions22:20:45.746 > esbuild ./src/functions/_worker.ts --bundle --format=cjs --outfile=./dist/_worker.js22:20:45.778 ✘ [ERROR] Could not resolve "@dxos/web-auth"
22:20:45.746 > build:functions22:20:45.746 > esbuild ./src/functions/_worker.ts --bundle --format=cjs --outfile=./dist/_worker.js22:20:45.778 ✘ [ERROR] Could not resolve "@dxos/web-auth"
I suspect this might be related to the module being part of a monorepo?