canirequire

canirequire › ESM-only › ember-data

Is ember-data ESM-only? Can you require() it?

(Legacy) The lightweight reactive data library for Ember applications

Last verified Sep 9, 2026 against ember-data@5.9.1. Markdown · JSON

ESM-only ESM-only since 5.3.4 — last CommonJS version is 5.3.3

ember-data dropped its CommonJS build in 5.3.4 (June 2024). The last version with a plain require()-able CommonJS entry is 5.3.3, published Mar 2, 2024; it declares support for Node.js >= 18.19.1.

require("ember-data") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. On Node.js 18, which has no require(esm), require("ember-data") fails with ERR_REQUIRE_ESM.

What to do

  1. require("ember-data") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it.
  2. From a CommonJS file, use a dynamic import inside an async function: const emberData = await import("ember-data"). That works on every Node.js version the package supports.
  3. If you need a synchronous require() or run Node.js 18: npm install ember-data@5.3.3, the last CommonJS release (published Mar 2, 2024); it declares Node.js >= 18.19.1.
  4. TypeScript: types are bundled; install nothing extra.
Latest
5.9.1 (Sep 5, 2026)
Module format
ESM-only
Last CommonJS version
5.3.3
ESM-only since
5.3.4 (Jun 15, 2024)
TypeScript types
Bundled
Node engines
not declared
Weekly downloads
134K
License
MIT

Does ember-data@5.9.1 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("ember-data") from a CommonJS file and import "ember-data" from an ES module.

Runtimerequire("ember-data")import "ember-data"
Node.js 18✗ failsSyntaxError✗ failsSyntaxError
Node.js 20✗ failsERR_MODULE_NOT_FOUND✗ failsERR_MODULE_NOT_FOUND
Node.js 22✗ failsERR_MODULE_NOT_FOUND✗ failsERR_MODULE_NOT_FOUND
Node.js 24✗ failsERR_MODULE_NOT_FOUND✗ failsERR_MODULE_NOT_FOUND
Node.js 26✗ failsERR_MODULE_NOT_FOUND✗ failsERR_MODULE_NOT_FOUND
Bun 1.4.0✗ failsError✗ failsError

How to import ember-data

ES modules (import)

import * as emberData from "ember-data";

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS (require)

// require("ember-data") failed in our probe on Node.js 20.19+, 22.12+ and newer as well (ERR_MODULE_NOT_FOUND); see the runtime table.

// Any Node.js version the package supports, from an async function:
async function main() {
  const emberData = await import("ember-data");
}

// Or pin the last CommonJS release (declares Node.js >= 18.19.1):
// npm install ember-data@5.3.3

Module format by version

Derived from the type, main and exports fields of every stable release on npm, corrected where a runtime test of that version contradicted them (257 versions; the newest 60 shown).

VersionsFormatFirst published
5.3.4 – 5.9.1ESM-onlyJun 15, 2024
4.6.5 – 5.3.3CommonJSMay 8, 2024

Frequently asked

Is ember-data ESM-only?

ember-data@5.9.1 is ESM-only. ember-data dropped its CommonJS build in 5.3.4 (June 2024). The last version with a plain require()-able CommonJS entry is 5.3.3, published Mar 2, 2024; it declares support for Node.js >= 18.19.1.

Which version of ember-data still supports CommonJS / require()?

5.3.3 is the last version of ember-data with a CommonJS build; it declares Node.js >= 18.19.1. Install it with "npm install ember-data@5.3.3". Every version from 5.3.4 on is ESM-only.

How do I use ember-data from a CommonJS file?

From a CommonJS file, use a dynamic import inside an async function: const emberData = await import("ember-data"). That works on every Node.js version the package supports. require("ember-data") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. Alternatively pin ember-data@5.3.3 (declares Node.js >= 18.19.1).

Does ember-data work in Bun?

Importing ember-data failed in Bun 1.4.0 on Sep 9, 2026: error: Cannot find module '@ember/debug' from '/Users/boat/Projects/top-seo/data/probe-work/ember-data/node_modules/ember-data/dist/index.js'

Does ember-data ship TypeScript types?

Yes. ember-data bundles its own type declarations; no @types package is needed.

Links

Other esm-only packages

Similar popularity