Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Environment:DevExpress Testcafe Node Runtime

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Runtime
Last Updated 2026-02-12 03:30 GMT

Overview

Node.js >= 16.0.0 runtime environment required by TestCafe for test compilation, execution, and browser orchestration.

Description

TestCafe is a Node.js-based end-to-end testing framework that requires Node.js 16.0.0 or higher. The runtime provides the foundation for test file compilation (Babel/TypeScript transpilation), browser process management via Chrome DevTools Protocol and Firefox Marionette, HTTP proxy server (testcafe-hammerhead), and the CLI/programmatic API. ESM loader support requires Node.js 18.19.0+ or 20.8.0+ for the module.register API. Internal module prefix resolution differs between Node versions (node: prefix for Node 15+, internal/ for earlier).

Usage

Required for all TestCafe operations. Every workflow (CLI execution, programmatic API, CI integration) runs on top of the Node.js runtime. The ESM loader for ES module test files is only available on Node.js 18.19.0+ or 20.8.0+.

System Requirements

Category Requirement Notes
OS Linux, macOS, Windows All major platforms supported
Runtime Node.js >= 16.0.0 Declared in package.json `engines` field
ESM Support Node.js >= 18.19.0 or >= 20.8.0 Required for `module.register` ESM loader API
Disk ~200MB For node_modules dependencies

Dependencies

System Packages

  • `nodejs` >= 16.0.0
  • `npm` (bundled with Node.js)

NPM Packages (Core)

  • `@babel/core` >= 7.23.2 (test file compilation)
  • `typescript` = 4.7.4 (TypeScript test files)
  • `coffeescript` >= 2.3.1 (CoffeeScript test files)
  • `testcafe-hammerhead` = 31.7.7 (HTTP proxy)
  • `chrome-remote-interface` >= 0.32.2 (Chrome DevTools Protocol)
  • `semver` >= 7.5.3 (version checking)
  • `commander` >= 8.3.0 (CLI argument parsing)

Credentials

No credentials required for the Node.js runtime itself. See other environment pages for browser-specific or CI-specific credentials.

Quick Install

# Install Node.js 16+ (via nvm)
nvm install 16
nvm use 16

# Install TestCafe
npm install testcafe

Code Evidence

Node.js version requirement from `package.json:21-23`:

"engines": {
    "node": ">=16.0.0"
}

ESM loader registration gated by Node version from `src/compiler/test-file/api-based.js:73-74`:

if (semver.satisfies(process.version, '18.19.0 - 18.x || >=20.8.0'))
    register('../esm-loader.js', pathToFileURL(__filename));

Internal module prefix detection from `src/errors/internal-modules-prefix.ts:1-3`:

import semver from 'semver';

const INTERNAL_MODULES_PREFIX = semver.gte(process.version, '15.0.0') ? 'node:' : 'internal/';

Common Errors

Error Message Cause Solution
`Error: Unsupported engine` Node.js version below 16.0.0 Upgrade Node.js to 16+ via nvm or system package manager
`ERR_UNKNOWN_MODULE_FORMAT` ESM test files on Node < 18.19 Upgrade to Node 18.19+ or use CommonJS require syntax
`ES Module: <file>` ES Module import in CJS context Use `--experimental-loader` flag or upgrade Node version

Compatibility Notes

  • Node.js 16.x: Minimum supported version. ESM loader requires `--experimental-loader` flag via NODE_OPTIONS.
  • Node.js 18.19+: Supports `module.register` API for cleaner ESM loader integration.
  • Node.js 20.8+: Full ESM support without experimental flags.
  • TypeScript: Bundled TypeScript compiler is version 4.7.4; user-provided `tsconfig.json` options are partially overridable (module, moduleResolution, and target are locked).

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment