This issue can also occur if you use a path alias like "@*": ["./*"]
, in your tsconfig.json or jest.config.ts. When using wildcard path aliases, Jest may fail to resolve modules correctly because it doesn't know how to map the alias to the actual file paths.