로그인 토큰이 만료되면 로그인 페이지로 보내버리는 부분이 평소에는 잘되더니 갑자기 에러가 뜨며 화면 이동이 안됐다.... 😭😭
에러들은 아래와 같다.
[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next
nuxt3 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'parentNode')
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'exposed')
멘붕이 온 나는 열심히 구글링을 하는데,
3시간동안 삽질한 결과 layout이 변할때 발생하는 문제로 생각이 되었다.
화면이 layouts/default.vue에서 로그인페이지로 이동하면 layouts/empty.vue로 이동을 하는데, 그때 발생하는 에러인것 같았다.
스택오버플로우에는 app.vue의 NuxtLayout을 div로 감싸야한다는 해결방안도 있었는데, 나는 해결되지 않았다ㅠㅠ
결국 vue의 버전문제라는 글을 봐서 vue 버전을 바꿔 설치하니 거짓말처럼 해결되었다!👏👏👏👏
"vue": "^3.3.13", -> "vue": "^3.4.8",