-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use firebase-admin + adapter-node (cannot be made external) #7216
Comments
I can confirm reproduction of this bug. This is a severe bug that makes deployment of adapter-node apps that use firebase-admin impossible. I also have had no luck in my search for a workaround. |
Same issue here as linked above. It bundles things that shouldn't be bundled. And they were not bundled in previous versions of adapter node. |
So it all happened on adapter-node 93 when it was switched from esbuild to rollup. However even going back to 92, gives me |
Also looks like, in my case it's because monorepo structure. So project I am building doesn't have any devDependancies or dependancies (dependancies only have workspace dependency). |
This is not fixed in my case. When there is dependancy in root package.json in monorepo in |
I'd argue this is the right thing to do anyway in my opinion - each package in a monorepo should explicitly list its dependencies, even if that means some packages list the same dependencies over and over. |
Describe the bug
Trying to use adapter-node with firebase-admin has been broken since the switch from esbuild to rollup (pinning to v92 of adapter-node works).
With the pinned version, the firebase-admin imports are retained in the server chunks, e.g.
But with any version after that, the firebase package is bundled in to the server code (but incorrectly, which causes an error).
The symptom is the error below, but the issue is really that firebase-admin is being bundled in no matter what.
Reproduction
https://github.com/CaptainCodeman/svelte-kit-firebase-admin-external
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
I tried to "server module" all the things, and also set thing to
external
in vite.config.js, but nothing seems to prevent it being bundled in. I've also tried changing it to be a devDependency (which I think would be incorrect, but was clutching at straws).The text was updated successfully, but these errors were encountered: