Josh
Josh•17mo 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)•17mo 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
Josh•17mo 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•17mo ago
If its made up of multiple npm packages, you can try rewriting those in Deno, and use dnt to publish to npm.
Josh
Josh•17mo ago
For an idea of the scope, here's our dependencies:
NeTT
NeTT•17mo ago
It will definitely be a very painful rewrite
Josh
Josh•17mo 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
NDH
NDH•17mo ago
A comprehensive migration tool would have been nice! Unfortunately that effort was put into absorbing node rather than converting node.
Josh
Josh•17mo 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•16mo ago
Maybe in the future deno will be able to run node projects directly without refactoring them