MaDsEn
MaDsEn16mo ago

Support for Fresh.deno

Was looking through the searches to see if any body got convex working properly with Fresh.deno?? , especially the convex/server and convex/values..
6 Replies
ballingt
ballingt16mo ago
@MaDsEn What are you seeing? Is this during server-side rendering? We intend for Convex to work in any JavaScript runtime but 1) we don't have test coverage for everything and 2) some environments are missing requirements we need like Bun's WebSocket support (specific to scripting/servers in Bun). Probably there's a fix we can make for Fresh.
MaDsEn
MaDsEnOP16mo ago
Mostly having trouble finding out how to extract the server and values from the convex package, as I am currently trying to Setup authentication with Lucia-auth.
ballingt
ballingt16mo ago
What do your imports look like? I think they should be something like
import { whatever } from "npm:convex/server"
import { whatever } from "npm:convex/server"
MaDsEn
MaDsEnOP16mo ago
Using esm to import, and as the package best SUITED for deno is the react package i wondered if we should wrap it in and esm? alias, as I am trying to figure out if I can use this package https://www.google.com/url?q=https://github.com/get-convex/convex-lucia-auth/tree/master&source=gmail&ust=1704865863886000&usg=AOvVaw2sGSQsu-DUyLapt8G6T1nF, or i need to create Lucia authentication from scratch and then try and sync it with convex, which would be the long road, which i am trying to avoid.. Tried npm but when running the code all kinds of errors shows up, as the packages server and values are not recognised. Will test it again, and try out a few things. Just wanted to hear if a solution was allready available, so all that could be avoided 😉
ballingt
ballingt16mo ago
I don't know of any Fresh examples, sorry! We'd love to have one to point people to if you figure one out. The convex npm package is a dual build package, the esm builds for each export including convex/react should work fine and not need to be wrapped — if not that's a bug we'll fix.
MaDsEn
MaDsEnOP16mo ago
Will get back to you when i figure it out 👍

Did you find this page helpful?