Skip to content

DTK0009: Storage Parse Failed

Package: @vitejs/devtools

Message

Failed to parse storage file: {filepath}, falling back to defaults.

Cause

This warning is emitted by createStorage() when a persisted storage file exists on disk but contains invalid JSON that cannot be parsed. The function catches the JSON.parse error and falls back to the provided initialValue defaults, so DevTools continues to function normally.

The storage files are typically located at:

  • Auth storage: node_modules/.vite/devtools/auth.json
  • User settings: node_modules/.vite/devtools/settings.json

Corruption can occur from incomplete writes (e.g., a crash during save), manual edits with syntax errors, or file system issues.

Example

A corrupted storage file triggers this warning on startup:

txt
// node_modules/.vite/devtools/settings.json
{ "dockLayout": "left", // trailing comma or syntax error

When DevTools reads this file, JSON.parse throws, and DTK0009 is logged with the file path.

Fix

Delete the corrupted file and restart your dev server. DevTools will recreate the file with default values automatically:

sh
# Remove the corrupted storage file
rm node_modules/.vite/devtools/settings.json

# Or remove the entire devtools storage directory
rm -rf node_modules/.vite/devtools/

# Restart the dev server
vite dev

No configuration will be lost beyond what was already corrupted. The underlying parse error is attached as cause on the diagnostic for additional debugging context.

Source

packages/core/src/node/storage.ts

Released under the MIT License.