Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/errors/VDT0003.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
outline: deep
---

# VDT0003: Inspect Storage Error

## Message

> Vite inspect storage failed while `{operation}`.

## Cause

The Vite inspect collector encountered a payload or plugin-call archive initialization, batched write, read, or shutdown failure.

## Example

Starting the Vite DevTools Vite UI plugin with an unwritable Vite cache directory can trigger this error.

## Fix

Restart the Vite dev server. If the error persists, clear the Vite cache directory and reinstall dependencies.

## Source

- [`packages/vite/src/node/inspect/store/index.ts`](https://github.com/vitejs/devtools/blob/main/packages/vite/src/node/inspect/store/index.ts) — the inspect store emits this when archive setup, batched writes, reads, or shutdown fail.
- [`packages/vite/src/node/inspect/store/payload.ts`](https://github.com/vitejs/devtools/blob/main/packages/vite/src/node/inspect/store/payload.ts) — the payload archive emits this when an in-memory or file-backed payload cannot be read or written completely.
- [`packages/vite/src/node/inspect/store/plugin-calls.ts`](https://github.com/vitejs/devtools/blob/main/packages/vite/src/node/inspect/store/plugin-calls.ts) — the plugin-call archive emits this when a binary event cannot be encoded, read, or written completely.
1 change: 1 addition & 0 deletions docs/errors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ Emitted by `@vitejs/devtools-vite`.
|------|-------|-------|
| [VDT0001](./VDT0001) | error | Inspect Context Unavailable |
| [VDT0002](./VDT0002) | error | Inspect Target Not Found |
| [VDT0003](./VDT0003) | error | Inspect Storage Error |
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ const parsedPaths = computed(() => props.modules.map((mod) => {
}))
const moduleTypes = computed(() => ModuleTypeRules.filter(rule => parsedPaths.value.some(mod => rule.match.test(mod.mod.id))))

function getModuleGraphLink(moduleId: string | undefined): string | false {
return moduleId
? `/graph?module=${encodeURIComponent(moduleId)}`
: false
}

const _tree = computed(() => {
const map = new Map<string, TreeNodeInput<PluginChartInfo | undefined>>()
const maxDepth = 3
Expand Down Expand Up @@ -338,7 +344,7 @@ watch(() => settings.value.pluginDetailsViewType, () => {
:id="child.text!"
w-full border-none ws-nowrap
:cwd="root"
:link="`/graph?module=${encodeURIComponent(child.text!)}`"
:link="getModuleGraphLink(child.meta?.graphModuleId)"
hover="bg-active"
border="~ base rounded" block px2 py1
/>
Expand Down
9 changes: 7 additions & 2 deletions packages/vite/src/app/components/data/PluginDetailsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const moduleTypeNameMap = computed(() => {
return map
})
const filterModuleTypes = ref<string[]>(settings.value.pluginDetailsModuleTypes ?? searchFilterTypes.value.map(item => item.name))
const selectedModuleTypes = computed(() => new Set(filterModuleTypes.value))
const { state: durationSortType, next } = useCycleList(['', 'desc', 'asc'], {
Expand Down Expand Up @@ -97,6 +96,12 @@ function toggleDurationSortType() {
next()
settings.value.pluginDetailsDurationSortType = durationSortType.value
}
function getModuleGraphLink(moduleId: string | undefined): string | false {
return moduleId
? `/graph?module=${encodeURIComponent(moduleId)}`
: false
}
</script>

<template>
Expand Down Expand Up @@ -181,7 +186,7 @@ function toggleDurationSortType() {
:id="item.module"
w-full border-none ws-nowrap
:cwd="root"
:link="`/graph?module=${encodeURIComponent(item.module)}`"
:link="getModuleGraphLink(item.graphModuleId)"
hover="bg-active"
border="~ base rounded" block px2 py1
/>
Expand Down
Loading
Loading