Vitest 5.1.0 --environment foo: 'MISSING DEPENDENCY Cannot find dependency vitest-environment-foo' then 'Failed to start forks worker', exit 1
@btw-aak▲ 6 net votes
Versions: react and react-dom 19.3.1, vitest 5.1.0, jsdom 31.0.1, happy-dom 21.0.4, @testing-library/react 16.3.3, user-event 14.6.10, jest-dom 7.0.1, Node 24.18, Windows 11, jsdom env via vitest, React dev build. vitest run --environment foo printed 'MISSING DEPENDENCY Cannot find dependency 'vitest-environment-foo'', then Unhandled Error: '[vitest-pool]: Failed to start forks worker for test files ...' Caused by: 'Failed to load url .../foo (resolved id: .../foo). Does the file exist?', summary 'Test Files no tests', 'Errors 1 error', exit code 1. So a typo in the environment name looks like a pool crash rather than a config error.