ErrLookup › vitest-dev/vitest

vitest-dev/vitest

Next generation testing framework powered by Vite. · TypeScript · 572 source files

Analyzed at 1fa9837ec2 on 2026-08-11. 351 documented errors.

Code / MessageTypeSeverityTags
received value must an HTMLElement or an SVGElement or a…
exception error matcher, argument-validation, browser, locator, dom
call in " " defined outside of the module's top level scope
exception error hoist-mocks, vi-mock, scope, top-level
Project " " was not found.
exception error projects, merge-reports, api-misuse
Snapshot environment module must have a default export…
exception error snapshot, snapshot-environment, config, default-export
No property descriptor for
exception error environment, node, internal-invariant, globalthis
@vitest/coverage-v8 does not work with
exception error coverage, browser, config
The Vitest config does't define any "tags", cannot apply
exception error config, tags, validation
Cannot parse ' ' because "module.stripTypeScriptTypes" is…
exception error automock, typescript, node-version, strip-type-script-types
toHaveFormValues must be called with an object of expected…
exception error matcher, argument-validation, browser, form
Multiple form elements with the same name must be of the…
exception error matcher, form, browser, dom
Browser provider is not defined for the project
exception critical browser-provider, config, internal-invariant, browser
Mock wasn't resolved. This is probably a Vitest error…
exception error browser-mode, mock-registry, async, vi-mock
Vitest mocker was not initialized in this environment. vi.
exception error mocker, vi, runtime-context, vite-node, environment
' ' cannot be used without test context
exception error snapshot, test-context, api-misuse, chai
Expecting a valid DOM element, but got
exception error browser, pretty-dom, debug, dom, type-guard
Mock wasn't registered. This is probably a Vitest error…
exception error browser-mode, mock-registry, vi-mock, race-condition
Unknown mock type
exception error browser-mode, msw, mock-registry, internal-guard
"@opentelemetry/api" is not installed locally. Make sure…
exception error opentelemetry, tracing, dependencies, configuration
expect.poll() is not supported in combination with .
exception error expect, poll, matcher, snapshot, assertion
[vitest] Expected synchronous evaluation to complete for
exception error vm, esm, internal-bug, synchronous-eval, top-level-await
Environment " " is not a valid environment. Path " " should…
exception error environment, config, custom-environment, module-export
value of unknown type
exception error diff, type-detection, edge-case, internal-guard
Cannot find iframe element. This is a bug in Vitest…
exception error internal, browser, iframe, scaling
Not called in the browser
exception error internal, browser, environment, worker-state
vi.when: " " is not a known method
exception error vi-when, internal, exhaustiveness, unreachable, bug
is not a `vi.when` instance
exception error vi-when, chai-assertion, mocking, type-guard
Invalid tags expression: unexpected
exception error cli, tags, parser, validation
Failed to fetch browser runner HTML from
exception warning internal, dev-server, browser, network
`bench.from()` could not find a result file at
exception error benchmark, baseline, file-not-found, bench-from
AssignmentPattern is not supported. Please open a new bug…
exception error automock, destructuring, assignment-pattern, vi-mock
Cannot parse the module format of
exception error automock, module-format, node-version, find-package-json
Failed to create Vitest API token at
exception error api-token, filesystem, permissions, ui, ci
There are some problems in resolving the mocks API. You may…
exception error hoist-mocks, globals, vi-mock, runtime-injected
The environment was not defined in the Vite config.
exception error config, environment, vite, worker-pool
The "preview" provider doesn't support…
exception error browser, user-event, provider, preview, drag-and-drop
Cannot take a screenshot without a test path
exception error browser, screenshot, playwright, lifecycle
@vitest/snapshot: Couldn't infer stack frame for inline…
exception error snapshot, inline, stack-trace, source-map
Failed to import test file
exception error runner, browser, module-resolution, vite, import
The vcsProvider module
exception error vcs, configuration, plugin-api, default-export
vi.useFakeTimers( ) is not supported in node:child_process…
exception error fake-timers, nexttick, child-process, pool-config, vi
does not work with Use either: ...or disable
exception error browser, debugging, config
Unexpected numerical input for "memoryLimit"
exception error configuration, validation, memory, worker-threads
Locator.filter expects at least one filter. None provided.
exception error locator, argument-validation, browser, filter
Asymmetric matcher does not implement toAsymmetricMatcher()
exception error pretty-format, asymmetric-matcher, expect, plugin
Cannot import " ": its vm context was torn down.
exception error vm, esm, lifecycle, async, imports
Unable to parse thresholds from configuration file
exception error coverage, thresholds, config-parse
Assertion name is not set. This is a bug in Vitest. Please…
exception error snapshot, internal, bug, unreachable, chai
stopChunkTrace cannot be called outside of the test file.
exception error browser, tracing, lifecycle, internal
Couldn't write file to fs
exception error filesystem, screenshot, browser, io
Data was not properly initialized. This is a bug in Vitest…
exception error internal, browser, runner, bootstrap
All browser instances within a project must use the same…
exception error config, browser, provider, validation
[vitest] Cannot register a mock that is already defined…
exception error registry, mock-registry, internal-api, typeerror
offset is longer than source length! offset
exception error sourcemap, offset, internal, cache
received value must a Node or a Locator that returns a Node.
exception error matcher, argument-validation, browser, dom, node
expect.poll() must be called inside a test
exception error expect, poll, lifecycle, assertion
Cannot compare screenshots without a test path
exception error screenshot, browser-command, test-context, browser
Commands are only available for browser tests.
exception error browser-command, webdriverio, provider, context-switch, browser
Invalid element or locator
exception error browser, expect, locator, type-guard, dom
[vitest] Manual mocks require a factory function.
exception error vitest, mocker, vi-mock, configuration
vi.when: no behavior defined when called with
exception error vi-when, onunmatched, mocking, strict-mocking
Cannot find environment for
exception warning module-graph, vite, environment, browser, ui
Element not found
exception error browser, dom, user-event, select, locator
process.exit unexpectedly called with
exception error process-exit, worker, lifecycle, mocking
'toMatchScreenshot' cannot be used with "not"
exception error matcher, screenshot, browser, visual-regression
Expected element or locator to be an instance of Element or…
exception error internal, browser, dom, locator, serialization
Test attachment requires only one of "body" or "path" to be…
validation error attachments, test-context, validation, artifact
Unrecognized comparator
exception error screenshot, comparator, config, browser, visual-regression
Worker state is not found. This is an issue with Vitest…
exception error internal, browser, worker-state, bootstrap
'toMatchScreenshot' cannot be used without test context
exception error matcher, screenshot, browser, test-context
automocking files with `export *` is not supported because…
exception error automock, browser-mode, export-star, vi-mock
"browser.instances" was set in the config, but the array is…
exception error config, browser, cli, validation
Environment " " is not a valid environment. Path " " should…
exception error environment, config, custom-environment, deprecation, validation
input with type=checkbox or type=radio cannot be used with…
exception error matcher, browser, form, input
[vitest] Failed to transform
exception error vite, transform, missing-file, vm, resolve
Cannot parse ' ' because "module.stripTypeScriptTypes" is…
exception error coverage, typescript, node-version, node-22
Cannot use the `bench` test-context fixture within a…
exception error benchmark, configuration, project-setup, fixture
No codec found for type
exception error screenshot, codec, image-format, browser
Don't have access to the "vitest" instance yet. This is a…
exception error internal, plugin-harness, bootstrap, vitest-instance
expected selection must be a string or undefined
exception error matcher, argument-validation, browser, selection
Root project is not initialized. This means that the Vite…
exception error api, lifecycle, internal-state, async
benchmark provider did not return a result for
exception error benchmark, provider, api-contract, result-mismatch
Looks like you set "test.environment" to "browser". To…
exception error config, browser, migration
vitest/browser can be imported only inside the Browser…
exception error browser, config, pool, import, workspace
Tag " ": retry.condition function cannot be used inside a…
exception error config, tags, retry, serialization, validation
' ' cannot be used with 'test.fails
exception error snapshot, test-fails, syntax-error, chai
Failed to resolve user-event package from
exception error browser-provider, dependency, preview, user-event, resolution
`resolveOptions` has to be used in a test file
exception error screenshot, browser-command, test-context, config
Benchmark artifact path
exception error security, path-traversal, benchmark, bench, validation
Test function is not found. Did you add it using `setFn`?
exception error runner, collector, internal
The " " is not defined in the configuration. Available tags…
exception error config, tags, validation
No projects were found. Make sure your configuration is…
exception error projects, filter, cli, config
Tag " ": priority must be a non-negative number.
exception error config, tags, validation
Cannot call "onTestFailed" inside a test hook.
exception error hooks, test-context, lifecycle
"snapshotFormat.compareKeys" function is not supported.
exception error config, snapshot, serialization, validation
[vitest] "register" is not available when running in Vitest.
exception error vm, module-system, esm-loader, runtime
import of ' ' by undefined is not supported: http can only…
exception error network, http, vm, security, loopback
vi.when: `times` option must be greater than 0
exception error vi-when, times-option, validation, range-error
Snapshot keys must end with a number.
exception error snapshot, file-format, data-corruption
Expected element or locator to be defined.
exception error internal, browser, dom, serialization
Failed to extract browser runner state from the response
exception warning internal, dev-server, browser, regex