Deployment Fails with @sveltejs/adapter-cloudflare
I am attempting to deploy to CloudFlare Page and I believe I need some help setting up my environment. My local environment is setup using Miniflare where I set the platform variable, here is what my
I am using drizzle-orm and lucia-auth for this project. Here are some function definitions
Here is what my
When I build and attempt to deploy the build it says the
Deployment ID -
I have search Google for an answer to my problem, but I haven't been able to find anyone else who is having the same problem with platform being undefined in a SvelteKit
Hopefully I have enough information in this post. Any help is appreciated!
hooks.server.ts file looks like: I am using drizzle-orm and lucia-auth for this project. Here are some function definitions
function getDB(db: D1Database) => DrizzleD1Database and function getAuth(db: D1Database) => AuthRequest (AuthRequest is a lucia type), however I don't think they are the issue, because it works just fine in my development environment with Miniflare.Here is what my
app.d.ts file looks like:When I build and attempt to deploy the build it says the
event.platform is undefined:Deployment ID -
55b93723-6495-4000-bfb4-f3e971753c60I have search Google for an answer to my problem, but I haven't been able to find anyone else who is having the same problem with platform being undefined in a SvelteKit
hooks.server.ts file. I have added the DB, KV and DOCS bindings from the workers dashboard, however I don't think that is the problem as well, because the error shows that the event.platform variable is undefined.Hopefully I have enough information in this post. Any help is appreciated!