Support monorepo
Firebase functions does not support monorepo structures (NPM monorepo, NX, Turborepo) during deployment.
Firebase uses custom archive logic for functions packaging (https://github.com/firebase/firebase-tools/blob/127ca3fbf7549d6c0cdf12e89e4465de9dd2b7c9/src/deploy/functions/prepareFunctionsUpload.ts), which does not support internal packages deployment out of the box.
Github discussion: https://github.com/firebase/firebase-tools/issues/653
-
Alex Zall commented
This has been a pain ********** since the early days of cloud functions.
There are some solutions but they are all ugly. Each solution is just copying the dependencies into the source folder of the deployed function and adjust the package.json for the time of the deployment.here is one
https://github.com/0x80/firebase-tools-with-isolate