Skip to content

DTK0033: DevTools Mode Persist Failed

Message

Failed to persist the DevTools mode flag at "{file}"

Cause

When a developer activates the DevTools overlay from passive mode (via the activation shortcut), Vite DevTools writes a small marker file into the project's node_modules so the docks show automatically on subsequent dev sessions. This diagnostic is logged (not thrown) when that write — or the removal on deactivation — fails, typically because node_modules is read-only or on a filesystem that rejects the write.

Activation still takes effect for the current session; only the persistence across restarts is lost.

Example

Running the dev server against a project whose node_modules directory is mounted read-only (some container setups) triggers this warning the first time the docks are activated.

Fix

Ensure the project's node_modules directory is writable by the user running the dev server. If node_modules must stay read-only, use visibility: 'normal' (the default) in the DevTools plugin options to always show the docks instead of relying on the persisted flag.

Source

Released under the MIT License.