-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Sorry in advance, if this is not the right place to flag this, but my issue is a constellation of things influencing each other.
The situation:
- I have a Vike project
- I'm using Bun as my runtime
- I'm using
@clerk/backendfor authentication - I'm using
honoand@hono/clerk-auth - I was using
vike-server, at this point things worked fine - I recently migrated to
vike-photon, that broke Clerk auth
My current understanding is the following:
- Photon depends on srvx
vike-photon → @photonjs/runtime → srvx - Photon eagerly loads
srvx/node, no matter the runtime - srvx monkey patches
globalThis.Request - This interferes with Clerk's kind of fragile
instanceofcheck - This eventually leads to a
TypeError: Cannot read properties of undefined (reading 'get')when Clerk is trying to access the cookies ClerkRequest's constructor never executes, soclerkUrlandcookiesfields stayundefined
Chances are, that this issue should be addressed in Clerk's or srvx's side. Still, I'm wondering if it's a good idea for Photon to eagerly load srvx/node when running on Bun? Is it even possible to lazily import the Node adapter?
I'd appreciate any tips, guidance or just a confirmation if my theory seems plausible.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working