canirequire › CommonJS › 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. JSON
CommonJS CommonJS — require() works on every Node.js version
ember-data ships CommonJS only. require("ember-data") works everywhere. import "ember-data" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.
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 | ✗ failserror: Cannot find module '@ember/debug' from '/Users/boat/Projects/top-seo/data/probe-work/ember-data/node_modules/ember-data/dist/index.js' | ✗ failserror: Cannot find module '@ember/debug' from '/Users/boat/Projects/top-seo/data/probe-work/ember-data/node_modules/ember-data/dist/index.js' |
A failing require() on a CommonJS package usually means the package needs a browser/DOM global, a peer dependency, or a native binary that is not available in a bare Node.js process.
How to import ember-data
ES modules (import)
import emberData from "ember-data";Named imports from a CommonJS package only work when Node.js can statically detect them. If a named import fails, use the default import and destructure.
CommonJS (require)
const emberData = require("ember-data");Module format by version
Derived from the type, main and exports fields of every stable release on npm (257 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 4.6.5 – 5.9.1 | CommonJS | May 8, 2024 |
Frequently asked
Is ember-data ESM-only?
ember-data@5.9.1 is a CommonJS package. ember-data ships CommonJS only. require("ember-data") works everywhere. import "ember-data" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.
Can I import ember-data with ES module syntax?
Yes. import emberData from "ember-data" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.
Does ember-data work in Bun?
Importing ember-data failed in Bun 1.4 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 commonjs packages
- debug 4.4.3CommonJS
- semver 7.8.5CommonJS
- ms 2.1.3CommonJS
- picomatch 4.0.7CommonJS
- ajv 8.20.0CommonJS
- source-map 0.8.0CommonJS
- react-is 19.2.8CommonJS
- readable-stream 4.7.0CommonJS
Similar popularity
- yeoman-test 11.8.2Dual
- xo 4.0.0ESM-only
- gulp-watch 5.0.1CommonJS
- np 12.1.0ESM-only
- vinyl-source-stream 2.0.0CommonJS
- gulp-istanbul 1.1.3CommonJS
- gulp-eslint 6.0.0CommonJS
- ember-cli-app-version 7.0.0CommonJS