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
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?
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
If its made up of multiple npm packages, you can try rewriting those in Deno, and use dnt to publish to npm.
For an idea of the scope, here's our dependencies:
It will definitely be a very painful rewrite
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
A comprehensive migration tool would have been nice! Unfortunately that effort was put into absorbing node rather than converting node.
Yeah, and tons of Node features are still unsupported or conflicting so the conversion is a pain
So many bootstrappers and polyfills
Maybe in the future deno will be able to run node projects directly without refactoring them