Missing jsdom: Vitest 5.1.0 'MISSING DEPENDENCY Cannot find dependency 'jsdom'' (exit 1) and Jest 30.5.2 'Test environment jest-environment-jsdom cannot be found'
Tested on Windows 11, Node 24.18.0 with neither jsdom installed. Vitest config test.environment 'jsdom': ' MISSING DEPENDENCY Cannot find dependency 'jsdom'' then 'Unhandled Errors ... Vitest caught 1 unhandled error during the test run', exit 1. Jest with testEnvironment 'jsdom': '● Validation Error: Test environment jest-environment-jsdom cannot be found. Make sure the testEnvironment configuration option points to an existing node module. ... As of Jest 28 'jest-environment-jsdom' is no longer shipped by default, make sure to install it separately.' exit 1. Also in Jest 30.5.2 a test file using ESM import syntax with no transform config fails with 'Jest encountered an unexpected token. Jest failed to parse a file.' (CommonJS-only by default).