Migrate To Deno logo

Migrate To Deno

Organization
denoland
migrate-to-deno

Use when moving a Node.js, npm, Yarn, pnpm, or Bun project to Deno, or when adopting Deno incrementally in an existing JavaScript or TypeScript codebase. Covers using Deno as a drop-in package manager, running existing package.json scripts, CommonJS versus ESM, node_modules layout, lockfile migration, permissions, whether to adopt the built-in toolchain, and per-tool command equivalents.

Overview

Publisherdenoland
Repositoryskills
Skill namemigrate-to-deno
Stars
99
Forks
8
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by denoland on GitHub. Read the source before you install it.

Installation

Install the Migrate To Deno AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/denoland/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/migrate-to-deno .claude/skills/migrate-to-deno
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Migrate To Deno in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Migrate To Deno on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Migrate To Deno is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Migrating to Deno

Requires Deno 2.9 or later. For general Deno usage once migrated, see the deno skill.

Most Node projects already run under Deno

Deno reads an existing package.json, resolves the same npm packages, writes a real node_modules, runs the same scripts, and supports node: built-ins. TypeScript runs with no build step.

There is usually no code to change — only which binary you invoke. Don't start by rewriting imports to jsr:, swapping dependencies for Deno-specific ones, or restructuring directories. Proposing that is the most common way this goes wrong.

Migrate in rungs

Each rung is independently useful and reversible. Stop wherever suits the project; plenty of teams stop at rung 1.

Rung 1 — Deno as the package manager only

bash
deno install

Reads package.json, resolves the same dependencies, writes node_modules, and creates deno.lock — seeded from any existing package-lock.json, yarn.lock, bun.lock, or pnpm lockfile, so pins and integrity hashes carry over instead of drifting.

The app still runs under node; teammates are unaffected. Commit deno.lock once verified. To back out: delete deno.lock and node_modules, then npm install.

Rung 2 — Run it with Deno

bash
deno run -A main.js      # or: deno -A main.js
deno task build          # runs scripts.build from package.json

Use -A here. The goal is confirming the program works, not designing a permission policy — changing both at once makes failures ambiguous.

Rung 3 — Tighten permissions

Replace -A with the narrowest set that works: run it, read what it asks for, grant exactly that.

bash
deno run --allow-net=api.example.com --allow-read=./config --allow-env=PORT main.js

This buys something Node cannot offer, and is worth doing before deploying.

Rung 4 — Optionally, adopt the built-in toolchain

deno fmt for prettier, deno lint for eslint, deno test for jest or vitest, deno check for tsc, deno watch for nodemon, deno compile for pkg.

Optional, and usually not worth it for an existing project. These are not drop-in replacements; parity is incomplete, so this is a real migration, not a config change. A project happy with prettier, eslint, and vitest should keep them and use Deno as runtime and package manager only. Prefer the built-in tools for new projects. If you do move an existing one, go a tool at a time.

Command equivalents

TasknpmYarnpnpmBunDeno
Install allnpm installyarn installpnpm installbun installdeno install
Addnpm i <p>yarn add <p>pnpm add <p>bun add <p>deno add <p>
Add devnpm i -D <p>yarn add -D <p>pnpm add -D <p>bun add -d <p>deno add -D <p>
Removenpm uninstall <p>yarn remove <p>pnpm remove <p>bun remove <p>deno remove <p>
CI installnpm ciyarn install --immutablepnpm i --frozen-lockfilebun install --frozen-lockfiledeno ci
Run scriptnpm run <s>yarn <s>pnpm <s>bun run <s>deno task <s>
Run binarynpx <p>yarn dlx <p>pnpm dlx <p>bunx <p>dx <p>
Outdatednpm outdatedyarn outdatedpnpm outdatedbun outdateddeno outdated
Auditnpm audityarn npm auditpnpm auditbun auditdeno audit
Whynpm ls <p>yarn why <p>pnpm why <p>bun why <p>deno why <p>
Run a filenode f.jsbun f.tsdeno f.ts
Run TSts-node f.tsbun f.tsdeno f.ts
Watchnodemon f.jsbun --watch f.tsdeno watch f.ts
Formatprettierprettierdeno fmt
Linteslintdeno lint
Testjest, vitestbun testdeno test
Coveragenyc, c8deno coverage
Type-checktsc --noEmittscdeno check
Bundle binarypkg, nexebun build --compiledeno compile

† Yarn Berry (v2+) spelling. Yarn Classic (v1) uses yarn install --frozen-lockfile and yarn audit.

‡ Yarn Classic only — Berry removed yarn outdated.

dx is a separate binary installed alongside Deno, and an alias for deno x. It does not appear in the top-level deno --help output. Like npx, it runs the package with the sandbox disabled.

The four things that actually break

Requires net access to "..." (or read, env, run)

Deno grants nothing by default. Add that specific permission, or -A while still establishing the program works at all.

ReferenceError: require is not defined

A file containing CommonJS is being parsed as ESM. .cjs is always CommonJS, .mjs always ESM; .js and .ts follow "type" in the nearest package.json. For a CommonJS project, set "type": "commonjs".

A dependency is broken, or postinstall never ran

Lifecycle scripts don't run by default. Native addons notice immediately. Approvals are recorded in the config file, so this is one-time:

bash
deno approve-scripts                              # interactive picker
deno install --allow-scripts=npm:better-sqlite3   # or name them directly

A tool cannot find files inside node_modules

Deno's layout is pnpm-style: real files in node_modules/.deno/, exposed via symlinks. Tools assuming npm's flat hoisted tree need:

json
{ "nodeModulesLinker": "hoisted" }

What has no Deno equivalent

Say so rather than improvising a workaround that won't hold:

  • Yarn Plug'n'Play. Deno creates a real node_modules; .pnp.cjs is unused and .yarnrc.yml resolver settings don't transfer.
  • yarn patch / pnpm patched dependencies. Vendor or fork.
  • overrides / resolutions. Pin via an import map entry instead.
  • Registry and resolver tuning in .npmrc / .yarnrc.yml.
  • Bun build features — macros, HTMLRewriter, HTML entrypoints.

Per-tool details

  • references/FROM_NPM.md — lockfile seeding, node_modules layout, overrides
  • references/FROM_YARN.md — Plug'n'Play, Berry vs Classic, workspaces
  • references/FROM_PNPM.mdpnpm-workspace.yaml, catalog:, patches
  • references/FROM_BUN.md — Bun API translation, bunfig.toml
  • references/NODE_APIS.mdnode: built-ins, DENO_COMPAT, CJS/ESM

Further reading

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Migrate To Deno AI skill do?

Use when moving a Node.js, npm, Yarn, pnpm, or Bun project to Deno, or when adopting Deno incrementally in an existing JavaScript or TypeScript codebase. Covers using Deno as a drop-in package manager, running existing package.json scripts, CommonJS versus ESM, node_modules layout, lockfile migration, permissions, whether to adopt the built-in toolchain, and per-tool command equivalents.

Why use Migrate To Deno on TypingMind?

Because you install it once and use it with any model. Migrate To Deno is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Migrate To Deno in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/denoland/skills/tree/main/skills/migrate-to-deno. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Migrate To Deno?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Migrate To Deno?

As many as you like. As long as a model supports skills, you can use Migrate To Deno with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Migrate To Deno AI skill free?

Yes. It is published on GitHub by denoland under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇