Hi, I've been using Remix for almost 10 months now. However, after moving to vite, and even using the newest remix template with vite, Everytime I have a new dependency change. Navigating to some page would show this error.
Application Error
TypeError: Cannot read properties of null (reading 'useMemo')
at Object.useMemo (http://localhost:3000/node_modules/.vite/deps/chunk-PW5ESXJ3.js?v=e9cfd96e:1094:29)
at useScope (http://localhost:3000/node_modules/.vite/deps/@radix-ui_react-popover.js?v=fe1fa0f0:102:21)
at Popover (http://localhost:3000/node_modules/.vite/deps/@radix-ui_react-popover.js?v=fe1fa0f0:1512:23)
at renderWithHooks (http://localhost:3000/node_modules/.vite/deps/chunk-RXX2RYKY.js?v=4a8bfba4:11548:26)
at mountIndeterminateComponent (http://localhost:3000/node_modules/.vite/deps/chunk-RXX2RYKY.js?v=4a8bfba4:14926:21)
at beginWork (http://localhost:3000/node_modules/.vite/deps/chunk-RXX2RYKY.js?v=4a8bfba4:15914:22)
at beginWork$1 (http://localhost:3000/node_modules/.vite/deps/chunk-RXX2RYKY.js?v=4a8bfba4:19753:22)
at performUnitOfWork (http://localhost:3000/node_modules/.vite/deps/chunk-RXX2RYKY.js?v=4a8bfba4:19198:20)
at workLoopSync (http://localhost:3000/node_modules/.vite/deps/chunk-RXX2RYKY.js?v=4a8bfba4:19137:13)
at renderRootSync (http://localhost:3000/node_modules/.vite/deps/chunk-RXX2RYKY.js?v=4a8bfba4:19116:15)
and eventually refresh itself with the correct page. This only happens whenever I have new changes in the dependency.