canirequire

canirequireDual (CommonJS + ESM) › @mui/material

Is @mui/material ESM-only? Can you require() it?

Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.

Last verified Sep 9, 2026 against @mui/material@9.4.0. JSON

Dual (CommonJS + ESM) Dual package — both require() and import work

@mui/material publishes both a CommonJS entry and a native ESM entry (ESM added in 7.0.0). require("@mui/material") and import "@mui/material" both work on every supported Node.js version and in Bun.

Latest
9.4.0 (Aug 27, 2026)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
9.4.0
Native ESM since
7.0.0
TypeScript types
Bundled
Node engines
>=14.0.0
License
MIT

Does @mui/material@9.4.0 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("@mui/material") from a CommonJS file and import "@mui/material" from an ES module.

Runtimerequire("@mui/material")import "@mui/material"
Node.js 18✗ failsMODULE_NOT_FOUND✗ failsERR_MODULE_NOT_FOUND
Node.js 20✗ failsMODULE_NOT_FOUND✗ failsERR_MODULE_NOT_FOUND
Node.js 22✗ failsMODULE_NOT_FOUND✗ failsERR_MODULE_NOT_FOUND
Node.js 24✗ failsMODULE_NOT_FOUND✗ failsERR_MODULE_NOT_FOUND
Node.js 26✗ failsMODULE_NOT_FOUND✗ failsERR_MODULE_NOT_FOUND
Bun 1.4✗ failserror: Cannot find module '@emotion/styled' from '/Users/boat/Projects/top-seo/data/probe-work/@mui__material/node_modules/@mui/styled-engine/index.js'✗ failserror: Cannot find module '@emotion/styled' from '/Users/boat/Projects/top-seo/data/probe-work/@mui__material/node_modules/@mui/styled-engine/index.mjs'

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 @mui/material

ES modules (import)

import material from "@mui/material";

CommonJS (require)

const material = require("@mui/material");

Module format by version

Derived from the type, main and exports fields of every stable release on npm (214 versions; the newest 60 shown).

VersionsFormatFirst published
9.0.0 – 9.4.0Dual (CommonJS + ESM)Apr 7, 2026
7.3.2 – 7.3.11CommonJSSep 2, 2025
7.0.0 – 7.3.1Dual (CommonJS + ESM)Mar 26, 2025
6.0.0 – 6.5.0CommonJSAug 27, 2024

Frequently asked

Is @mui/material ESM-only?

@mui/material@9.4.0 ships CommonJS and ESM builds. @mui/material publishes both a CommonJS entry and a native ESM entry (ESM added in 7.0.0). require("@mui/material") and import "@mui/material" both work on every supported Node.js version and in Bun.

Can I require @mui/material?

Yes. @mui/material ships a CommonJS entry, so require("@mui/material") works on every Node.js version, alongside the native ESM entry for import.

Does @mui/material work in Bun?

Importing @mui/material failed in Bun 1.4 on Sep 9, 2026: error: Cannot find module '@emotion/styled' from '/Users/boat/Projects/top-seo/data/probe-work/@mui__material/node_modules/@mui/styled-engine/index.mjs'

Does @mui/material ship TypeScript types?

Yes. @mui/material bundles its own type declarations; no @types package is needed.

Links

Other dual (commonjs + esm) packages

Similar popularity