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
- require("ember-data") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it.
- 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.
- 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.
- TypeScript: types are bundled; install nothing extra.
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.
| Runtime | require("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.3Module 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).
| Versions | Format | First published |
|---|---|---|
| 5.3.4 – 5.9.1 | ESM-only | Jun 15, 2024 |
| 4.6.5 – 5.3.3 | CommonJS | May 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
- ansi-styles 7.0.0last CJS
5.2.0 - strip-ansi 7.2.0last CJS
6.0.1 - commander 15.0.0last CJS
14.0.3 - supports-color 11.0.0last CJS
8.1.1 - chalk 6.0.0last CJS
4.1.2 - string-width 8.2.2last CJS
4.2.3 - ansi-regex 6.3.0last CJS
5.0.1 - escape-string-regexp 5.0.0last CJS
4.0.0
Similar popularity
- yeoman-test 11.8.2ESM-only
- xo 4.0.0ESM-only
- gulp-watch 5.0.1CommonJS
- np 12.1.0No entry
- vinyl-source-stream 2.0.0CommonJS
- gulp-istanbul 1.1.3CommonJS
- gulp-eslint 6.0.0CommonJS
- ember-cli-app-version 7.0.0CommonJS