Skip to main content
Run a Node project with Deno.

Run a Node project with Deno and win prizes in the #NodeToDenoChallenge


UPDATE 2024/01/04: The challenge is over! Thanks everyone who participated. Read the results here.

It has been a busy year in Deno land. We launched Deno KV, Deno Queues, Deno Cron, Deno Subhosting, SaaSKit, shipped six minor updates to Fresh, 10 minor updates to the Deno CLI… the list goes on.

One of our biggest initiatives this year is improving Node and npm compatibility. The npm registry, the largest open source registry in the world, has many useful modules, and we want you to use them in Deno. Since introducing npm: specifiers in Deno 1.28, we’ve added built-in support for Node modules via node: specifiers, the ability to bring your own node modules, not to mention ongoing polyfills and improvements.

To encourage everyone to try Deno in their Node projects, we’re kicking off the #NodeToDenoChallenge.

Starting today until January 4th, run Deno in any of your Node projects, screenshot the output (success or failure), and tweet* it with the hashtag #NodeToDenoChallenge. We’ll pick 10 random participants and the individual who tried running Deno on the largest Node project by lines of code, and reward them with $100 gift card to the Deno merch store.

*And if you’re not on Twitter, you can still participate! Just paste your success or error output in GitHub issues or on Mastodon. As long as we can find it.

How to participate

Yes, it’s holiday season and no one can be bothered to do anything, so we’re making participation as streamlined as possible:

  1. Take any Node project. Doesn’t need to be an app or a server. Can be a script even.
  2. If necessary, update import statements to ESM. This means replacing
const module = require("module");

with

import module from "module";
  1. Add the below deno.json file, which enables various unstable Node/npm compatibility settings, to the root of your project.
{
  "unstable": [
    "bare-node-builtins",
    "byonm",
    "sloppy-imports",
    "unsafe-proto"
  ]
}
  1. Run this command:
deno run -A $FILE
$FILE is whichever file you would use in the command node $FILE.
  1. Take a screenshot of the output, regardless of success or failure.
  2. Share it on Twitter or create a GitHub issue. (If you want to be eligible for the “largest Node project” category, then you must also include a link to the GitHub so we can verify lines of code.)

And that’s it! Have a cup of cocoa and cozy up by the fire.

What are all these unstable Node compatibility settings?

For additional info on Node/npm interoperability with Deno, check out these resources:

Prizes

On January 4th, 10 randomly selected participants will win a $100 gift card to the Deno merch store. Multiple submissions do not increase the chances of being selected.

Additionally, the submission that attempted to run Deno on the largest Node project by lines of code is guaranteed to win a $100 gift card. (Note that in order to be eligible for this prize, you must share a link to the GitHub project for us to verify lines of code.)

Finally, to encourage everyone to get the word out and share it with your circles, if we get more than 100 unique submissions, we’ll raise the gift card prize from $100 to $200.

We’ll keep track of the total number of submissions in our Discord.

Results

We’ve received a total of 47 submissions, ranging from utility libraries like node-cbor and node-gamedig, scaffolding and build tools like create-react-app and create-vite, a VSCode extension manager, personal websites, apps, and bots, and more.

The largest Node project (by lines of JavaScript/TypeScript) submitted was kibana with 3,212,395 lines. The submission also included a step-by-step walkthrough of their attempt, such as modifying require statements, the set of enabled Deno flags, and removing some Node version validation. Congratulations to hverlin for winning the Largest Node Project prize.

Thank you everyone for participating and helping us improve our Node compatibility. If you were one of the 10 randomly selected, the Deno tam will contact you on Twitter, Discord, or email with prize information.

That’s it!

If you have any issues, let us know on Twitter or Discord.