canirequire › CommonJS › @alifd/next
Is @alifd/next ESM-only? Can you require() it?
A configurable component library for web built on React.
Latest version 1.27.34, published Mar 31, 2026. Markdown · JSON
CommonJS CommonJS — require() works on every Node.js version we test
@alifd/next ships CommonJS only. require("@alifd/next") should work on every Node.js version the package supports; the runtime probe has not run for this version. import "@alifd/next" 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.
It also declares a "module" field, so bundlers such as webpack, Vite and esbuild pick up an ESM build for tree-shaking.
What to do
- require("@alifd/next") should work on every Node.js version the package supports; the runtime probe has not run for this version.
- From ES modules use the default import: import next from "@alifd/next"; then destructure. Named imports only work when Node.js can statically detect the exports.
- TypeScript: types are bundled; install nothing extra.
Does @alifd/next@1.27.34 actually load? Runtime test results
Runtime probe pending for this version. The values below are what package.json declares; they are refreshed once the probe runs.
| Runtime | require("@alifd/next") | import "@alifd/next" |
|---|---|---|
| Node.js 18 | ✓ expected | ✓ expected |
| Node.js 20 | ✓ expected | ✓ expected |
| Node.js 22 | ✓ expected | ✓ expected |
| Node.js 24 | ✓ expected | ✓ expected |
| Node.js 26 | ✓ expected | ✓ expected |
| Bun 1.4.0 | pending | pending |
Install failed in our sandbox: error: ConnectionRefused downloading package manifest @alifd/next The rows above show what package.json declares.
How to import @alifd/next
ES modules (import)
import next from "@alifd/next";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 next = require("@alifd/next");Module 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 (436 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 1.26.13 – 1.27.34 | CommonJS | Feb 27, 2023 |
Frequently asked
Is @alifd/next ESM-only?
@alifd/next@1.27.34 is a CommonJS package. @alifd/next ships CommonJS only. require("@alifd/next") should work on every Node.js version the package supports; the runtime probe has not run for this version. import "@alifd/next" 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 @alifd/next with ES module syntax?
Yes. import next from "@alifd/next" 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 @alifd/next ship TypeScript types?
Yes. @alifd/next 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
- isparta 4.1.1CommonJS
- rollup-plugin-url 3.0.1CommonJS
- fast-sass-loader 2.0.1CommonJS
- node-nats-streaming 0.3.2CommonJS
- rollup-plugin-eslint 7.0.0CommonJS
- vue-html-loader 1.2.4CommonJS
- microbundle-crl 0.13.11CommonJS
- tap-min 3.0.0ESM-only