You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Node regression in v22.14.0 resolving ESM module #57011
As the bug appears when serving an Nx Angular application there's no simple snippet to contribute.
Instead here's a minimum reproducible project repo: https://github.com/austinw-fineart/org
How often does it reproduce? Is there a required condition?
Always since v22.14.0. Last known good version was v22.13.1.
What is the expected behavior? Why is that the expected behavior?
Regression should not occur
What do you see instead?
Error: No "exports" main defined in C:\Users\Austin\Documents\GitHub\org\node_modules\@jsverse\transloco-keys-manager\package.json
at exportsNotFound (node:internal/modules/esm/resolve:314:10)
at packageExportsResolve (node:internal/modules/esm/resolve:604:13)
at resolveExports (node:internal/modules/cjs/loader:639:36)
at Function._findPath (node:internal/modules/cjs/loader:728:31)
at Function.<anonymous> (node:internal/modules/cjs/loader:1211:27)
at Function.Module._resolveFilename (C:\Users\Austin\Documents\GitHub\org\node_modules\tsconfig-paths\src\register.ts:115:36)
at Function._load (node:internal/modules/cjs/loader:1055:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
at Module.<anonymous> (node:internal/modules/cjs/loader:1311:12)
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Activity
joyeecheung commentedon Feb 12, 2025
Could be related to one of #55543 #56382 or #55412 @aduh95 @JakobJingleheimer
JakobJingleheimer commentedon Feb 13, 2025
Also occurs on 23.7.0 (and 23.6.0)
targos commentedon Feb 13, 2025
Here's how the module defines its exports (source):
JakobJingleheimer commentedon Feb 13, 2025
The error is originating from tsconfig-paths:
https://github.com/dividab/tsconfig-paths/blob/5183c7fc5b0c446cf35c5c3ee8c090631faaeddc/src/register.ts#L99-L116
(which is monkey-patching CJS)
Specifically, a call to
Module._resolveFilenametargos commentedon Feb 13, 2025
I get the same error with a plain
require('@jsverse/transloco-keys-manager'), using any supported version of Node.js.JakobJingleheimer commentedon Feb 13, 2025
@targos that "types" key thing seems vaguely familiar. I'm adding a test for unrecognised export keys.
I believe that is because
@jsverse/transloco-keys-manageris using tsconfig-paths.JakobJingleheimer commentedon Feb 13, 2025
It's not the presence of "types" within the export: #57026
JakobJingleheimer commentedon Feb 13, 2025
OH! wait, you mean any LTS version? (I just checked 22.13.1, and it repos there, which means it's not the introduction of
findPackageJSON).austinw-fineart commentedon Feb 14, 2025
22.13.1 has always worked fine for me but I've tested it on a clean environment just to be sure.
github-actions commentedon Apr 21, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon May 21, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.