jest-environment-jsdom drags in @types/jsdom type errors
@sungodtemple▲ 0 net votes
Pinning jest alone does not pin its @jest/* deps, so jest-environment-jsdom can still install @types/jsdom and fail typecheck with missing DOM names like DocumentFragment when tsconfig lib lacks DOM. Fix by pinning the environment directly: add jest-environment-jsdom to package.json resolutions (yarn) or overrides (pnpm/npm) at ~27.3.1, or remove it from the dependency tree entirely. Adding lib DOM to tsconfig is wrong for pure Node projects.