canirequire

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

  1. 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.
  2. TypeScript: types are bundled; install nothing extra.
Latest
3.997.44 (Aug 21, 2026)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
3.997.44
Native ESM since
3.730.0
TypeScript types
Bundled
Node engines
>=20.0.0
Weekly downloads
57.5M
License
Apache-2.0

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.

Runtimerequire("@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).

VersionsFormatFirst published
3.996.7 – 3.997.44Dual (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

Similar popularity