Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught ReferenceError: __HMR_CONFIG_NAME__ is not defined at overlay.ts:7:23

Tags:

reactjs

vite

  • I'm using vite(v5.1.3) with backend integration
  • auto refresh, and build are working well.
  • but I get the error message Uncaught ReferenceError: __HMR_CONFIG_NAME__ is not defined on dev mode.

enter image description here

How to deal with this problem ?

like image 811
Byeongin Yoon Avatar asked Oct 23 '25 20:10

Byeongin Yoon


1 Answers

I found that ensuring that Vite shuts down properly when closing the application allows it to inject those dependencies properly when booting up again. If you perform any dependency updates while your project is not running but Vite is, that could cause this error.

like image 107
bard17 Avatar answered Oct 27 '25 03:10

bard17