Skip to content

Elide for Node users

Switching from Node.js to Elide: what runs unchanged, which commands and APIs change, TypeScript without a compile step, benchmarks and trade-offs.

On this page

Elide runs JavaScript and TypeScript with Node APIs and npm packages. Check your application’s modules and framework before switching.

Check your application

For an HTTP app, start with framework compatibility: Hono has a runnable example; Express 5 has body-middleware limitations; Fastify 5 imports an unavailable module. Check the API Overview for other node:* modules your app imports.

The Compatibility Matrix reports API test-suite results. Run your application’s tests and exercise its request handlers to check the dependencies and code paths you use.

Run the same code

Terminal
bash
elide app.js                    # or: elide run app.js
elide app.ts                    # no compile step, no tsconfig.json
elide install --ecosystems=npm  # dependencies from package.json
elide test                      # node:test files
  • Built-ins load with or without the node: prefix.
  • CommonJS and ES modules both work.
  • http.createServer serves as in Node, as does a module that default-exports a fetch handler or calls Elide.serve({ fetch }).

For a complete first example, follow JavaScript and TypeScript. For a server, follow Build an HTTP service. If an installed package cannot be imported, see Module not found after elide install.

What changes

NodeElide
node app.jselide app.js
npm installelide install --ecosystems=npm; plain elide install skips npm
package-lock.jsonaube-lock.yaml
npm run buildelide run build
npx toolelide run tool for a tool in node_modules/.bin; no download-and-run
node --testelide test
node --inspect app.jselide run --debugger=cdp app.js
node --watch app.jsNo equivalent
node --env-file=.env app.jsCall process.loadEnvFile() in code
node --permission --allow-fs-read=.elide --allow-read=. app.js; see Sandbox and Limits
node:worker_threadsSame module; new Worker honors only workerData, eval, transferList and env
node:sqlite DatabaseSyncDatabase from elide:sqlite; see SQLite

Elide does not set NODE_ENV.

Weaknesses

  • node:http2, node:cluster, node:inspector and node:wasi throw ERR_UNKNOWN_BUILTIN_MODULE.
  • https.createServer throws ERR_HTTPS_SERVER_UNSUPPORTED; terminate TLS in front of http.createServer.
  • No WebSocket global.
  • No bundler: elide web build transforms each file and keeps its imports.
  • No macOS Intel build; macOS releases are Apple Silicon only.

Benchmarks

Hello-world startup with hyperfine -N -w 10 -r 100 on a 24-core AMD Ryzen Threadripper PRO 9965WX Linux workstation:

RuntimeCommandMean
Nodenode hello.js11.70 ± 0.90 ms
Elideelide run hello.js1.43 ± 0.06 ms
Bunbun hello.js1.63 ± 0.18 ms
Denodeno run hello.js6.31 ± 0.30 ms

Elide’s measured mean is lower than Bun’s in this recording. In the separate non-pipelined HTTP comparison, Elide served 635,510 requests/s and Node 24.22.0 LTS served 123,519 requests/s with the same load and CPU budget. See HTTP serving for the settings, latency, and raw reports.

Versions, setup, and recordings: Benchmarks.

Strengths

  • Runs .ts, .mts and .cts files directly.
  • Scopes network access by host and subprocesses by command: --allow-net=api.example.com, --allow-run=git.
  • Limits workers, open files, heap and run time: --limit=workers=4, --limit=fds=128, --max-mem=512m, --timeout=30s.
  • Includes SQLite, PostgreSQL and MySQL drivers as elide:sqlite, elide:postgres and elide:mysql.

Next steps

Was this page helpful?