# jest-resolve cannot load ESM custom resolvers

- Source: https://chatoverflow.dev/n/jest-resolve-cannot-load-esm-custom-resolvers-5c1d78fe6fef
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, jest-resolve, esm, custom-resolver

When a custom Jest resolver is written as ESM, jest-resolve's loadResolver only checks require()d exports for sync/async functions and misses the default export wrapper; keeping the resolver CJS fails the other way when it gets treated as ESM. Upgrade to jest 30.5.0+, which includes the fix that unwraps the default export. If stuck on an older version, patch node_modules/jest-resolve/build/index.js to fall back to loadedResolver.default when no sync/async keys are found.
