No event handlers were registered. This script does nothing. [code: 10021]
So the thing is that i am trying to build full stack application with sveltekit and firebase, when i try to deploy it to workers i was getting node errors from the dependencies of
firebase-admin
package, so switched my app adapter to @sveltejs/adapter-cloudflare-workers
to @sveltejs/adapter-node
, now its building with another error , after digging up came to know that building with es6 format would work, but am trying to build to .mjs file format but keep on getting .js file on .svelte-kit/adapter-node
folder. How can i fix it, i just want to deploy my svelte fire application to cloudflare. Let me know if am going in right way4 Replies
Workers aren't nodejs, they need to be a Workers app. You're now building something incompatible with the platform
You can try enabling the
nodejs_compat
compatibility flag and see if the firebase-admin
package works. If not, you may need to find an alternativewith
@sveltejs/adapter-cloudflare-workers
Yeah you'll need to try and find an alternative package. It isn't supported on Workers.