canirequire › Dual (CommonJS + ESM) › @aws-sdk/nested-clients
Is @aws-sdk/nested-clients ESM-only? Can you require() it?
Nested clients for AWS SDK packages.
Last verified Sep 9, 2026 against @aws-sdk/nested-clients@3.997.44. Markdown · JSON
Dual (CommonJS + ESM) Dual package, subpaths only — require("@aws-sdk/nested-clients/…") works, require("@aws-sdk/nested-clients") does not
@aws-sdk/nested-clients exposes only subpaths in its exports map, for example "@aws-sdk/nested-clients/sso"; there is no root entry, so require("@aws-sdk/nested-clients") and import "@aws-sdk/nested-clients" both throw ERR_PACKAGE_PATH_NOT_EXPORTED. Each subpath ships a CommonJS and a native ESM build, so require("@aws-sdk/nested-clients/sso") and import "@aws-sdk/nested-clients/sso" both work.
What to do
- Load subpaths, never the bare name: const nestedClients = require("@aws-sdk/nested-clients/sso") or import from "@aws-sdk/nested-clients/sso". require("@aws-sdk/nested-clients") throws ERR_PACKAGE_PATH_NOT_EXPORTED.
- TypeScript: types are bundled; install nothing extra.
Does @aws-sdk/nested-clients@3.997.44 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@aws-sdk/nested-clients") from a CommonJS file and import "@aws-sdk/nested-clients" from an ES module.
| Runtime | require("@aws-sdk/nested-clients") | import "@aws-sdk/nested-clients" |
|---|---|---|
| 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 |
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 @aws-sdk/nested-clients
ES modules (import)
import * as nestedClients from "@aws-sdk/nested-clients/sso";Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.
CommonJS (require)
const nestedClients = require("@aws-sdk/nested-clients/sso");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 (194 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 3.996.7 – 3.997.44 | Dual (CommonJS + ESM) | Mar 6, 2026 |
Frequently asked
Is @aws-sdk/nested-clients ESM-only?
@aws-sdk/nested-clients@3.997.44 ships CommonJS and ESM builds, reachable only through subpaths. @aws-sdk/nested-clients exposes only subpaths in its exports map, for example "@aws-sdk/nested-clients/sso"; there is no root entry, so require("@aws-sdk/nested-clients") and import "@aws-sdk/nested-clients" both throw ERR_PACKAGE_PATH_NOT_EXPORTED. Each subpath ships a CommonJS and a native ESM build, so require("@aws-sdk/nested-clients/sso") and import "@aws-sdk/nested-clients/sso" both work.
Can I require @aws-sdk/nested-clients?
Only by subpath. require("@aws-sdk/nested-clients") throws ERR_PACKAGE_PATH_NOT_EXPORTED because the exports map has no root entry; require("@aws-sdk/nested-clients/sso") works, and so does import from the same subpath.
Does @aws-sdk/nested-clients work in Bun?
Importing @aws-sdk/nested-clients failed in Bun 1.4.0 on Sep 9, 2026: error: Cannot find module '@aws-sdk/nested-clients' from '/Users/boat/Projects/top-seo/data/probe-work/@aws-sdk__nested-clients/imp.mjs'
Does @aws-sdk/nested-clients ship TypeScript types?
Yes. @aws-sdk/nested-clients bundles its own type declarations; no @types package is needed.
Links
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- tslib 2.8.1Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
Similar popularity
- @octokit/types 18.0.0No entry
- fast-xml-parser 5.11.1Dual
- @aws-sdk/xml-builder 3.972.40CommonJS
- normalize-package-data 9.0.0CommonJS
- @humanfs/core 0.19.2ESM-only
- leven 4.1.0ESM-only
- unist-util-is 6.0.1ESM-only
- typed-array-byte-offset 1.0.4CommonJS