Sorikairo
Sorikairo
DDeno
Created by Jgamer1y on 12/26/2023 in #help
Is there a recommended library to do dependency injection in Deno?
You can use Danet and leverage its custom DI system. It even provides a CLI to bundle for Deploy, a guide on how to do so manually, and a github action ready to use.
18 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
I would say any bundling library such as esbuild ? I believe there were a few very valuable contribution to plugin to handle Deno well
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Gotcha, sad, but glad it works on Deploy for you then
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Do you have any open source repo of a project you deployed on Deno deploy that uses it by any chance ? it's on the back of my head for 2 years, if it gives me a resolution it would be cool (already starring all the repo you linked, for fairness)
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
But deno_reflect also need emitDecoratorMetadata as stated by their doc https://deno.land/x/deno_reflect@v0.2.0 (it's also what Danet uses)
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
But then, if you say that it works on Deploy without any bundling (and I believe you) it either means Deploy handles it now, or they do it another way. In both case, that's awesome
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Without it, swc and tsc do not emit constructors and methods paramstype, so DI cannot work AFAIK
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Yes, but for fro's usecase, which is dependency injection (if I understood correctly the piece of code they gave), it probably needs it. But also just noticed it uses some npm packages, so maybe more shenanigans
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
It is made for Danet app but the concepts apply to any app that uses decorators and thus specific compiler options
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
If it has not been implemented/fixed yet, @fro.profesional you have to first bundle your app in your ci/locally with the emitDecoratorMetadata options and then upload the bundle to deploy. Here is a guide to do so https://danet.land/deno-deploy.html
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Dropping in because oak decorators is really close to https://github.com/Savory/Danet Last time I checked around 6 months ago, deploy does not handle emitDecoratorsMetadata while the runtime does,so if you rely on paramstype metadata it won’t work. Maybe it has been implemented since @bartlomieju ?
72 replies
DDeno
Created by Nehu on 9/24/2023 in #help
`deno lsp` does not understand bare imports without prefix
If you are using a Jetbrains IDE, it’s a Deno plugin issue
3 replies
DDeno
Created by Timo Martinson on 6/11/2023 in #help
Uncaught (in promise) TypeError: cannot read headers: request closed
Does the react client crashes or something ? Because requests ending unexpectedly when working locally seems pretty hard to do
34 replies
DDeno
Created by Timo Martinson on 6/11/2023 in #help
Uncaught (in promise) TypeError: cannot read headers: request closed
Looks like an issue with oak, where the connection dies unexpectedly
34 replies
DDeno
Created by Timo Martinson on 6/11/2023 in #help
Uncaught (in promise) TypeError: cannot read headers: request closed
Oh, is it not happening every time ? Makes it quite hard 😭
34 replies
DDeno
Created by Timo Martinson on 6/11/2023 in #help
Uncaught (in promise) TypeError: cannot read headers: request closed
Error should have a stacktrace so you can deduct where the error come from, do not hesitate to post it here
34 replies
DDeno
Created by Timo Martinson on 6/11/2023 in #help
Uncaught (in promise) TypeError: cannot read headers: request closed
So it fails when you do a POST request to one of the endpoint ?
34 replies
DDeno
Created by Timo Martinson on 6/11/2023 in #help
Uncaught (in promise) TypeError: cannot read headers: request closed
which line throws the error ?
34 replies
DDeno
Created by Timo Martinson on 6/11/2023 in #help
Uncaught (in promise) TypeError: cannot read headers: request closed
The fact that it says "Uncaught (in promise)" hints that you might not be awaiting a promise
34 replies