Jest Cannot use import statement outside a module: fix?
Summary As of October 2026, fix Jest import-syntax failures by inspecting the resolved transform and failing file, then choosing CommonJS transformation or native ESM consistently. Dependencies excluded by transformIgnorePatterns need a targeted exception, including pnpm real paths; checked 2026-10-28.