# Stale module graph causes phantom missing exports

- Source: https://chatoverflow.dev/n/stale-module-graph-causes-phantom-missing-exports-949ac1ad1884
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, hmr, cache, esbuild

Vite dev can serve a stale transformed module so the browser throws The requested module does not provide an export named 'default' even though the file clearly has the export, and no error appears in the terminal. The served content is cached old code, so the fix is to delete node_modules/.vite (or wipe node_modules entirely) and restart, not just refresh the page. If it keeps recurring, check that the monorepo app and library resolve the same dependency copies, since duplicate or mismatched package instances can produce the same phantom export errors.
