canirequire › ESM-only › ember-source
Is ember-source ESM-only? Can you require() it?
A JavaScript framework for creating ambitious web applications
Last verified Sep 9, 2026 against ember-source@7.2.0. Markdown · JSON
ESM-only ESM-only since 7.2.0 — last CommonJS version is 7.1.0
ember-source dropped its CommonJS build in 7.2.0 (August 2026). The last version with a plain require()-able CommonJS entry is 7.1.0, published Jun 22, 2026; it declares support for Node.js >= 20.19.
ember-source exposes only subpaths in its exports map, for example "ember-source/types"; there is no root entry, so import "ember-source" itself throws ERR_PACKAGE_PATH_NOT_EXPORTED. Import the subpath you need instead.
require("ember-source") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. Node.js 18 has no require(esm), and ember-source@7.2.0 declares Node.js >= 20.19, so 18 is outside its supported range anyway.
ember-source@7.2.0 declares engines ">= 20.19", so Node.js 18 is outside its supported range regardless of module format.
What to do
- Import subpaths, never the bare name: import from "ember-source/types". import "ember-source" throws ERR_PACKAGE_PATH_NOT_EXPORTED.
- require("ember-source") 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 emberSource = await import("ember-source/types"). That works on every Node.js version the package supports (>= 20.19).
- If you need a synchronous require(): npm install ember-source@7.1.0, the last CommonJS release (published Jun 22, 2026); it declares Node.js >= 20.19.
- ember-source@7.2.0 declares engines ">= 20.19", so Node.js 18 is unsupported regardless: upgrade Node.js or pin an older release.
- TypeScript: types are bundled; install nothing extra.
Does ember-source@7.2.0 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("ember-source") from a CommonJS file and import "ember-source" from an ES module.
| Runtime | require("ember-source") | import "ember-source" |
|---|---|---|
| Node.js 18 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| Node.js 20 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| Node.js 22 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| Node.js 24 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| Node.js 26 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED |
| Bun 1.4.0 | ✗ failsError | ✗ failsError |
How to import ember-source
ES modules (import)
import * as emberSource from "ember-source/types";Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.
CommonJS (require)
// require("ember-source/types") failed in our probe on Node.js 20.19+, 22.12+ and newer as well; see the runtime table.
// Any Node.js version the package supports (>= 20.19), from an async function:
async function main() {
const emberSource = await import("ember-source/types");
}
// Or pin the last CommonJS release (declares Node.js >= 20.19):
// npm install ember-source@7.1.0Module 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 (231 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 7.2.0 | ESM-only | Aug 9, 2026 |
| 4.8.0 – 7.1.0 | CommonJS | Oct 17, 2022 |
Frequently asked
Is ember-source ESM-only?
ember-source@7.2.0 is ESM-only. ember-source dropped its CommonJS build in 7.2.0 (August 2026). The last version with a plain require()-able CommonJS entry is 7.1.0, published Jun 22, 2026; it declares support for Node.js >= 20.19.
Which version of ember-source still supports CommonJS / require()?
7.1.0 is the last version of ember-source with a CommonJS build; it declares Node.js >= 20.19. Install it with "npm install ember-source@7.1.0". Every version from 7.2.0 on is ESM-only.
How do I use ember-source from a CommonJS file?
From a CommonJS file, use a dynamic import inside an async function: const emberSource = await import("ember-source/types"). That works on every Node.js version the package supports (>= 20.19). require("ember-source") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. Alternatively pin ember-source@7.1.0 (declares Node.js >= 20.19).
Does ember-source work in Bun?
Importing ember-source failed in Bun 1.4.0 on Sep 9, 2026: error: Cannot find package 'ember-source' from '/Users/boat/Projects/top-seo/data/probe-work/ember-source/imp.mjs'
Does ember-source ship TypeScript types?
Yes. ember-source 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
- flow-bin 0.331.0CommonJS
- grunt-contrib-clean 2.0.1CommonJS
- conventional-changelog-cli 5.0.0No entry
- typechain 8.3.2CommonJS
- gulp-plumber 1.2.1CommonJS
- vue-class-component 7.2.6CommonJS
- gulp-typescript 6.0.0-alpha.1CommonJS
- @vue/cli-plugin-eslint 5.0.9CommonJS