Skip to content

Conversation

@GNURub
Copy link

@GNURub GNURub commented Dec 10, 2025

This PR adds CommonJS (CJS) build output to the package. While ESM is the standard, many backend frameworks—most notably NestJS—still default to or rely heavily on CommonJS/require for module loading.

Problem

Currently, attempting to import this package in a CJS environment (like a standard NestJS application or a TypeScript project compiling to CJS) results in the following runtime error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './express' is not defined by "exports" in ...

This happens because node is looking for a require entry in the exports map but only finds import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant