Node.js to Bun or Deno: an npm dependency checklist

By CompatLab ·

Before moving a Node.js app to Bun or Deno, check the exact npm versions and import paths in your project. A passing import gets you to the next test. For an HTTP client that means making a request, and for an image library it means processing an image on your deployment platform.

Start with the dependency your app actually loads

  1. Read the resolved version from your lockfile, including the workspace that uses it.
  2. Copy the actual specifier and mode from your code, such as import "zod/v4/core" or require("axios"). The package root and its subpaths can resolve differently. Node.js export rules
  3. Find recorded npm loading results and open the cell for your target runtime and import mode. Check its runtime version, observation date and coverage.
  4. Run one application test that exercises the dependency in the target environment. Compare the response or error with the same test on your existing Node.js deployment.

The four observations below use Node.js 24.21.0 and 26.10.0, Bun 1.4.2 and Deno 2.9.7 on Linux amd64 with glibc. Each report pins its own dependency snapshot. Install scripts and probe networking were disabled, and the probes loaded entries without calling exports. The follow-up tests below are instructions for your application.

Axios 1.20.0 on Bun or Deno

The package root loaded with ESM and CommonJS on all four runtime profiles on October 9. The observed subpaths passed too, including axios/dist/node/axios.cjs. The report is inconclusive overall because the planner did not enumerate ./unsafe/*. If your code imports another internal path, check that exact specifier in the report.

Next test. Send a request to a local fixture server using your app’s configured adapter. Assert the status and decoded response, then force a slow response and verify the timeout handling. Include redirects or streaming only if your app uses them. See the Axios request options.

axios@1.20.0 version evidence · Original loading report for axios@1.20.0

Zod 4.6.7 and explicit subpaths

On November 10 the root and tested subpaths loaded in both modes on all four profiles. Those subpaths included zod/v4/core and zod/v4/mini. The wildcard ./v4/locales/* was omitted. A pass for zod/v4/locales leaves an individual locale import unverified unless that path has its own observation.

Next test. Run the exact schema your app uses with one valid and one invalid input. Compare the output of transforms and the validation issues your error handler consumes. If you use Mini or a locale, keep that import in the test. See Zod’s parsing guide.

zod@4.6.7 version evidence · Original loading report for zod@4.6.7

Sharp 0.35.5 and native dependencies

The root loaded in both modes on all four profiles on October 9. The report covers the Linux glibc snapshot used for that observation. A deployment that uses musl, arm64 or a different optional-dependency selection can load a different native binary.

Next test. Install with your deployment’s lockfile on its actual architecture and libc. Resize a small fixture using the image formats and options your app relies on. Assert the output format and dimensions. Check Sharp’s platform and optional-dependency requirements.

sharp@0.35.5 version evidence · Original loading report for sharp@0.35.5

gRPC clients with @grpc/grpc-js 1.14.6

The root loaded in both modes on all four profiles on October 9. The report stops at loading. It contains no client-to-server calls.

Next test. Call a local test service with your generated client. Check a successful response and the status you get when a deadline expires. If production uses TLS, metadata or streaming, cover the same path in your integration environment.

@grpc/grpc-js@1.14.6 version evidence · Original loading report for @grpc/grpc-js@1.14.6

What to record before you switch

  • The exact version, import path and mode for each dependency on a critical path.
  • The target runtime version, OS, architecture and installation prerequisites.
  • One application test per critical dependency and what it proved on each runtime.
  • Untested paths and operations that still need coverage before the migration.

Use the Bun Node.js API notes or Deno’s Node and npm guide when a test depends on a Node.js API. For a lockfile review in a coding agent, see the read-only MCP guide.

Look up another npm dependency · Read the loading test methodology