Replies: 52 comments 96 replies
-
I hope this question gets answered cos using Deno is quite uncomfortable esp when you will be paying for the service. As a frontend dev, it's trying to change the way I work. Node would have make supabase edge functions way easier to use. After all netlify functions uses node. |
Beta Was this translation helpful? Give feedback.
-
Deno is currently the only open-source JavaScript runtime optimized to run on the edge. This was a key factor in our decision to go with Deno. Check our intro blog post where we dive more into the details on the reasons to choose Deno. Also, Deno is improving on its Node compatibility layer and NPM support. So we expect it wouldn't be too hard for developers familiar with Node to adopt Deno. Having said that, we are also keeping a close eye on other open-source efforts on JS runtimes and are ready to evolve. |
Beta Was this translation helpful? Give feedback.
-
I have the same sentiment, we have all been watching Deno for it's npm compatibility when we could have been writing functions. To me, Edge Functions are not valuable to the platform because they are on the edge, they are valuable because on most any project, inevitably, something will need to be on the server. Devs need server functions. Having them closer to the user is secondary and could be entirely optional. Reading the intro blog post, I get the feeling it was easier to sub it out the Deno platform. Regardless, Supabase is a great platform and the compatibility is here. A really common Firebase setup is to use a single cloud function to host an express app allowing for multiple endpoint routes.
|
Beta Was this translation helpful? Give feedback.
-
I agree - Edge Functions almost fills that gap in Supabase's backend options, but I agree that a normal "cloud functions" setup would be extremely valuable while Deno is still in its growing phase. NPM compatibility is nice, but as it is right now it's felt a little tacky and unreliable; sometimes I just need my code to work. |
Beta Was this translation helpful? Give feedback.
-
@naclcaleb Do you have any specific examples of code that doesn't work with Deno? |
Beta Was this translation helpful? Give feedback.
-
@laktek not recently...I one thing I remember is trying to use the I also remember trying to use the npm
Throws:
I think my biggest problem with Deno is, I don't like to think that with so many tiny things like this out there, I'm never going to know whether a package I need to use will work or not. I just have to try it out and see if it produces an error or not. It feels uneasy. |
Beta Was this translation helpful? Give feedback.
-
Can there please be a guide for creating a new Edge Function if you come from a Node.js (aka Firebase/Netlify) background? I'm following your Discord bot guide and I've never used Deno before and it's a pain. |
Beta Was this translation helpful? Give feedback.
-
The npm: packages are not working in the edge functions can anybody help ?
|
Beta Was this translation helpful? Give feedback.
-
@deepak-coding-art We have currently disabled Have you tried importing it from |
Beta Was this translation helpful? Give feedback.
-
@laktek |
Beta Was this translation helpful? Give feedback.
-
i'm waiting for the bunjs edge function proposal in the near future |
Beta Was this translation helpful? Give feedback.
-
I spent the whole day trying to get data from supabase into an excel document, it's still not working. In node, 5 minutes. We need documentation on using npm or how Deno is going to provide the same service. |
Beta Was this translation helpful? Give feedback.
-
Here is my suggestion for this issue: #14532 |
Beta Was this translation helpful? Give feedback.
-
I agree with the OP's sentiment. finding the right package on deno/esm hasnt been a great experience and a time suck. @laktek It would be nice if Supabase can keep like a running list of commonly used packages and where to get them from. like in your example -
|
Beta Was this translation helpful? Give feedback.
-
I agree. The supabase experience has been stellar but having to switch to Deno has been a huge pain for me. I've been building our MVP for 2.5 months and this is the first time I'm questioning my decision to use Supabase. The DX is much worse trying to use both node and deno in the same project,. |
Beta Was this translation helpful? Give feedback.
-
Hey everyone, I want to share we now support npm modules natively, along with Node compatibility in Edge Functions. Read the announcement blog post for more details. Also, the guides have been updated to show how to add npm modules via import maps and add type details for npm modules. https://supabase.com/docs/guides/functions/import-maps If you have any specific questions about using a npm module or a Node built-in API, feel free to create a separate discussion or open a support request. I'm closing this discussion for new comments. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this is the best place to do this, but we've also given up on using Supabase Edge Functions because of the poor developer experience. My team has evaluated using Edge Functions for a variety of projects but coming from a Node/Lambda background we found the Deno DX to be way too painful. Half the things we try to do seem to not be supported, and the rest of the time it feels like we're just wandering around blind in the dark. Poor documentation, poor developer tools, inconsistent support for common Node packages, poor debugging and feedback, etc. We'll be sticking with Lambdas for now. We really enjoy Supabase, but Edge Functions are one thing that we have found to be really, really disappointing. |
Beta Was this translation helpful? Give feedback.
-
Deno is not NodeJS and it's dissapointing that in order to use edge functions not only my team has to battle with Deno but also have to change their workflow and their IDE settings in order to accomodate a tool they will hardly ever use Deno, which btw the internal APIs are not compatible with those of NodeJS which we use everywhere, everyday. When Edge Functions actually provide a NodeJS runtime you will be adopting the rest of the developers that work with NodeJS instead of forcing them to learn Deno or excluding them entirely. Going to leave this again fastify/fastify#2173 because I believe its important to understand that Deno is not NodeJS and that a layer of support for node is not the same as a native runtime for it. |
Beta Was this translation helpful? Give feedback.
-
Please add support for monorepo shared packages. Sharing code between projects is basically impossible |
Beta Was this translation helpful? Give feedback.
-
Deno is the worst, I was battling with it for 3 days now to implement a simple watermarking image functionality |
Beta Was this translation helpful? Give feedback.
-
Trying to implement some simple rabbitmq workflows, battling with Deno for hours, and wondered, "Who the hell thought this was a good idea?!". It's time to support Node natively without jumping through compatibility hoops. Make it the default runtime and move on with your lives. You're lost in the sunk-cost fallacy. |
Beta Was this translation helpful? Give feedback.
-
I had a terrible developer experience battling with nodeJS vs Deno compatibility in a monorepo concept. My use case was quite simple:
Even tools for this use case (mentioned in the supabase docs) like trigger.dev are very hard/impossible to integrate into a deno environment. I am not even mentioning the numerous times I needed to restart my vscode because it got lost switching from NodeJS to Deno (and type linter is broken) Can you please reconsider this choice? 🙏 |
Beta Was this translation helpful? Give feedback.
-
Why Supabase probably chose Deno
The only cost effective alternative for Supabase would probably be AWS Serverless (for NodeJS), which is what Vercel and Netlify use, similar to Cloud Run which is what Google uses. They all require Cold Starts, which are inacceptable for many users. No Serverless is going to support long-running tasks. Period (and unfortunately). The only alternative for this is to host the long-running task on Heroku or Digital Ocean i.e. However, then you usually don't get the Serverless CDN, so it will be slower for lots of users depending on their location. The alternative is to use Edge Functions on an Edge Network. Netlify uses Deno on the Edge while Vercel uses Cloudflare (Workers) on the Edge (Cloudflare). These support longer running tasks (limited to web-sockets) with no cold starts, but the import module compatibility is worse. Deno is much better than Cloudflare Workers by far for compatibility (however also by far a bigger pain in the butt to use). I have not seen any Edge networks with Bun, but I suspect Bun would be even more compatible than Deno, but not support everything. I have not seen Bun hosted anywhere on the Edge, but that would be interesting. I prefer Edge over Serverless Cold Starts any day, and Deno on the Edge is going to be the current best bet for this. You lose the CDN if you lose Node Serverless unless there is some costly custom alternative. As I said above, all SSR Frameworks (except Angular currently) can use Serverless or Edge functions with the Framework (Cloud Run, Vercel, Netlify, Amazon) when deployed. If you hate Deno, host your app using Serverless somewhere, or host on a custom server network. I would like to see Bun hosted on an Edge Network somewhere, but I suspect it will have its own problems for Node users as well. There are always tradeoffs. J |
Beta Was this translation helpful? Give feedback.
-
2 years later and still using this garbage it's actually crazy |
Beta Was this translation helpful? Give feedback.
-
this is extremely painful... i have audio file conversions i am trying to run using ffmpeg that work fine in node, yet I am burining through hours trying to make this work in Deno... poor decision not providing better options here |
Beta Was this translation helpful? Give feedback.
-
I have to say, after wasting days and days and days and days and days on Deno, I agree with the sentiment of most people in this app. Doubling down on this half baked technology is a piss poor decision |
Beta Was this translation helpful? Give feedback.
-
I wish I could use Supabase for everything, but alas I will be spinning up serverless Node functions on Vercel. DX is more important than cold starts here. |
Beta Was this translation helpful? Give feedback.
-
Deno is amazing.Hadn't had a reason to start using it, and the DX after leaving node years ago for golang, is great. |
Beta Was this translation helpful? Give feedback.
-
Glad i found this thread, spent 2 days trying to write a function to send a push notification. Every step of the way was something new; no types, couldn't import shared code, working out what jsr: npm: node: meant and finally environment variables, it's all a mess and not working, so I gave up to run on Node somewhere else. Really wish they had Node functions, I'm happy to choose a region to deploy them in, as an option. |
Beta Was this translation helpful? Give feedback.
-
I am using deno 2. if i import external file via sometimes edge function does not reflect changes at all. Which makes debugging very confusing and make us lose al lot of time ( specially stress developers ). For now We are stop and restarting the edge function every time make changes to edge function. very annoying Please acknowledge deno was bad choice and support node ( prefferably both ) Again have a look at this. @awalias ( let me mention you because I recieve a lot of marketing emails titled by you ) |
Beta Was this translation helpful? Give feedback.
-
So, I just started working with Edge functions, and I have some concerns as to the decision to have them run on Deno rather than Node. While I think Deno has its benefits and I'd love to see it more widely in use, for a product aimed at making the development process easier for devs I'm not really sure if it's the right choice...for example, while many NPM packages can work with Deno easily enough using something like esm.sh, there are also many that just don't, and require more work to set up that would have been avoided having just used Node.
Also, I would imagine that a lot of Supabase users are frontend devs who are familiar with JS frameworks like React, Vue, or Svelte, so most of the users are probably already proficient in using Node. There's also a greater amount of documentation and community support online for Node than for Deno.
I have an open mind about it though, so I'd love to hear what the original thinking behind that decision was?
Beta Was this translation helpful? Give feedback.
All reactions