
[MSW] The currently registered Service Worker has been generated by a different version of MSW (2.4.1)...
2024. 12. 18. 14:53
개발/Error note
index.js:21 [MSW] The currently registered Service Worker has been generated by a different version of MSW (2.4.1) and may not be fully compatible with the installed version. It's recommended you update your worker script by running this command: • npx msw init You can also automate this process and make the worker script update automatically upon the library installations. Read more: https://ms..

[vercel] 서버리스 api 와 함께 배포할 때 동적라우팅이 인식안되는 경우
2024. 11. 30. 18:12
개발/Error note
로컬에서는 결과가 나왔는데, 버셀 배포후에 동적라우팅이 안됐다. // vercel.json{ "rewrites": [ { "source": "/api/(.*)", "destination": "/api/$1" }, { "source": "/api/fortune/result/:id", "destination": "/api/fortune/result/[id]" }, { "source": "/(.*)", "destination": "/index.html" } ]} 임시저장이 이제 세 개 남았다 ..

[Kakao API] because the scheme does not have a registered handler.
2024. 11. 6. 12:40
개발/Error note
공유하기 버튼을 눌렀는데 콘솔에 해당 오류가 떴다. 상태코드는 200 이었다. 엥 이게뭐지 하고 해당오류를 구글링 해봤다. 카카오 개발자센터 Dev Talk에 이미 해당 이슈에 대한 답변이 달려있었다. 놀랍게도 개발자모드를 모바일 환경으로 설정해놔서 뜨는 오류였다.해당 설정을 꺼주고 PC화면으로 보니 짜잔 팝업이 제대로 뜨고 카카오톡 전송까지 됐다~ 참고 - https://devtalk.kakao.com/t/scheme-does-not-have-a-registered-handler/112757

[React] Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.
2024. 9. 17. 16:06
개발/Error note
로그인 할때 오류가 발생했다. 오류내용은 예상된 훅보다 적은 훅이 랜더링됐고 실수로 일찍 반환된 훅이 있다는 오류였다. 기존코드/** * 'EID_AUT' 쿠키가 있는지 확인하여 사용자가 로그인 상태인지 확인합니다. * 쿠키가 있는 경우 사용자를 '/preview' 페이지로 리디렉션합니다. */const checkLoggedIn = () => { const cookie = getCookie('EID_AUT') const U_IF = localStorage.getItem('U_IF') if (cookie && U_IF) { return true } else { return false }}if (checkLoggedIn()) { return }useLayoutEffect(() => {..

[vercel] .env에 환경변수로 넣어둔 값들을 추가해야 할 때
2024. 9. 5. 18:25
개발/Error note
Vercel로 배포 후 테스트 중 .env에 넣어둔 파일들의 변수값이 불러오지 않아 오류가 발생했다. git을 통해서 vercel은 배포되기때문에 .gitignore에 추가해둔 .env는 없는 파일이라 읽지 못했기 때문이다. 해결방법 해당 프로젝트에서 Settings를 들어간다 Project Settings에서 Environment Variables로 이동 env에 입력해뒀던 키와 값을 입력하고 save를 해준다 그리고 Deployments로 이동 Redeploy를 해준다. 그러면 오류없이 이제 화면이 잘 동작한다 ;)