canirequire › CommonJS › @emotion/core
Is @emotion/core ESM-only? Can you require() it?
Last verified Sep 9, 2026 against @emotion/core@11.0.0. JSON
CommonJS CommonJS — require() works on every Node.js version
@emotion/core ships CommonJS only. require("@emotion/core") works everywhere. import "@emotion/core" 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 @emotion/core@11.0.0 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@emotion/core") from a CommonJS file and import "@emotion/core" from an ES module.
| Runtime | require("@emotion/core") | import "@emotion/core" |
|---|---|---|
| Node.js 18 | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. |
| Node.js 20 | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. |
| Node.js 22 | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. |
| Node.js 24 | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. |
| Node.js 26 | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. | ✗ failsError: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. |
| Bun 1.4 | ✗ failserror: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. | ✗ failserror: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`. |
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 @emotion/core
ES modules (import)
import core from "@emotion/core";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 core = require("@emotion/core");Module format by version
Derived from the type, main and exports fields of every stable release on npm (57 versions; the newest 57 shown).
| Versions | Format | First published |
|---|---|---|
| 0.0.4 – 11.0.0 | CommonJS | Feb 9, 2018 |
Frequently asked
Is @emotion/core ESM-only?
@emotion/core@11.0.0 is a CommonJS package. @emotion/core ships CommonJS only. require("@emotion/core") works everywhere. import "@emotion/core" 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 @emotion/core with ES module syntax?
Yes. import core from "@emotion/core" 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 @emotion/core work in Bun?
Importing @emotion/core failed in Bun 1.4 on Sep 9, 2026: error: The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`.
Does @emotion/core ship TypeScript types?
Yes. @emotion/core 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
- @angular/animations 22.1.5ESM-only
- @ethersproject/networks 5.8.0CommonJS
- @fortawesome/react-fontawesome 3.5.0Dual
- @vitejs/plugin-vue-jsx 5.1.6ESM-only
- @babel/polyfill 7.12.1CommonJS
- @oclif/config 1.18.17CommonJS
- @semantic-release/git 11.0.1ESM-only
- @vue/eslint-config-typescript 14.9.0Dual