Josh
Josh•2y ago

Migrating large Node project to Deno

Is there any reliable way to migrate a Node project to Deno? Currently working on a large project that is in dependency purgatory and am sweet talking the team into Deno, but they don't want to have to rewrite everything. It has gulp and workbox as well which are essentials. It has a lot of weird Node quirks which I'd like to remove completely if we switch over
9 Replies
Andy (he/him)
Andy (he/him)•2y ago
hey josh, thanks for sharing. it's hard to give a general answer, since every code base is different. what kind of project is it? web app, API server, microservices, monorepo, etc?
Josh
JoshOP•2y ago
It's a web game, the source is in TypeScript and we use Gulp to have Webpack and a lot of plugins generate the public pages and scripts
ry
ry•2y ago
If its made up of multiple npm packages, you can try rewriting those in Deno, and use dnt to publish to npm.
Josh
JoshOP•2y ago
For an idea of the scope, here's our dependencies:
NeTT
NeTT•2y ago
It will definitely be a very painful rewrite
Josh
JoshOP•2y ago
I've made some progress using Denoify and rewriting the rest by hand 😂 had to remove a lot of packages to even get it to run properly. Ty for the help, I guess there will be better solutions in the future for migrating
Fifth-Normal-Form
Fifth-Normal-Form•2y ago
A comprehensive migration tool would have been nice! Unfortunately that effort was put into absorbing node rather than converting node.
Josh
JoshOP•2y ago
Yeah, and tons of Node features are still unsupported or conflicting so the conversion is a pain So many bootstrappers and polyfills
markthree
markthree•2y ago
Maybe in the future deno will be able to run node projects directly without refactoring them

Did you find this page helpful?