ink
ink•3mo ago

Run Nest.js with Deno2.0

Hi, congrats for Deno2.0 release. Now I'm trying to run my Nest.js project with Deno2.0 But I'm a noob and do not know how.(I didn't totally understood Deno2.0 supports npm modules) What is the standard or official way to run nest with Deno2.0? Just wait for Nest team to support Deno2.0?
14 Replies
Di
Di•3mo ago
Hey, just install nestjs via npm and use deno to run commands like start, dev, etc. That's it
ink
inkOP•3mo ago
Could you provide me full commands?
$ npm i -g @nestjs/cli
$ nest new .
$ # i donno what goes in here
$ #its originally $nest start
$ npm i -g @nestjs/cli
$ nest new .
$ # i donno what goes in here
$ #its originally $nest start
fro.profesional
fro.profesional•3mo ago
@ink This worked for me pnpx @nestjs/cli new deno-2-nestjs and I chosed pnpm for install After that cd into the project and run deno task dev and should work! I tried directly with deno and did not work deno -A npm:@nestjs/cli new deno-2-nestjs So for more complex scenarios (like this one, running nestjs) we have to use a know package manager like npm, pnpm and use deno run the app, does that make sense?
ink
inkOP•3mo ago
No description
ink
inkOP•3mo ago
I removed my node and npm to make sure deno runs it but I failed. I exactly followed your instruction except for the project name.
fro.profesional
fro.profesional•3mo ago
You are right 🤔
console.log(Deno)
^
ReferenceError: Deno is not defined
console.log(Deno)
^
ReferenceError: Deno is not defined
fro.profesional
fro.profesional•3mo ago
I think I got it working following this https://uptownhr.com/blog/nest-on-deno/ I'm creating a repro
NestJS on Deno?
Running NestJS on Deno (Yes, It's Possible!)
fro.profesional
fro.profesional•3mo ago
GitHub
GitHub - fro-profesional/deno-2-nestjs
Contribute to fro-profesional/deno-2-nestjs development by creating an account on GitHub.
ink
inkOP•3mo ago
thx I'll try this after few hours
ink
inkOP•3mo ago
No description
ink
inkOP•3mo ago
seems working:cookie_deno: :deno_thankyou:
fro.profesional
fro.profesional•3mo ago
Hopefully, in the future, we can scaffold an app using the NestJS CLI Although I think it would be a matter of adding the dependencies to the deno.json? I'll try that later
ink
inkOP•3mo ago
I tried using TypeORM for the project but encountered some issues. For now, I’m done with it and will wait until either NestJS or Deno officially supports the other.
Sorikairo
Sorikairo•3mo ago
You can try Danet. It’s Deno’s NestJS equivalent. It handles HTTP, Websocket, KVQueue Worker, Scheduled Task, SSE. Probably the most comprehensive documentation in Deno first userland. https://github.com/Savory/Danet https://danet.land
GitHub
GitHub - Savory/Danet: The most mature backend framework for Deno. ...
The most mature backend framework for Deno. Create awesome HTTP and WebSocket server as well as KVQueue workers ! - Savory/Danet
Danet
The most mature backend framework for Deno

Did you find this page helpful?