-
Notifications
You must be signed in to change notification settings - Fork 70
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
Cloudflare Worker adapter builds fail with sk-auth #42
Comments
Well this is interesting. I had an older project I setup to test all this and I jumped back to it and, good news, it builds, but it then fails to publish to CF. package.json of building (but not publishing) project:
Wrangler publish error:
|
Btw, if this means sk-auth + CF workers isn't a good fit yet, that's fair. (And if so, What adapter would you recommend as the most stable choice instead?) |
Hey there! Thanks for opening this issue! That's interesting. I'm not really well versed in CF Workers and how they work, but it seems they're a serverless platform so the way entrypoints work might be different from having a constantly running Node app, and assets might get optimized differently by Vite, which would explain why it's complaining about The goal is for SKAuth to work on all deploy targets, except in SPA mode or static builds of course, and I can imagine this being an issue for Vercel, Netlify, etc, too, so I'll be looking into it once I get a chance! First I'll have to figure out how to isolate and reproduce the issue, though. Given that, I think there is a chance, that at the moment only the Node adapter will work properly. I'll look into whether this is an issue with certain dependencies, and if we can get away with switching them out for alternatives, or if a more robust solution is needed. |
Thanks! Based on your note here and advice in the SvelteKit discord I've moved my little hobby project over to the node adapter. I haven't gotten a chance to deploy yet, but dev wise this plugin is working great, thx for your work! |
This seems to be due to a single package - If so, can it not be replaced with |
I'm getting this build error on vercel. (Local environment is working.)
Is the root cause same as this?
|
I have a simple sveltekit app that works with sk-auth locally, and works with the node adapter build, but fails with the logs below when I try to use the Cloudflare worker adapter. I've tried playing around w/ the Vite excludes settings but haven't had any luck yet.
Here's my
svelite.config.js
And here's my package.json
Error log below:
The text was updated successfully, but these errors were encountered: