error
-
[react-slick] currentSlide, slideCount errorerror 2024. 7. 16. 11:13
react does not recognize the `currentSlide` prop on a dom element. if you intentionally want it to appear in the dom as a custom attribute, spell it as lowercase `currentslide` instead. if you accidentally passed it from a parent component, remove it from the dom element. react does not recognize the `slideCount` prop on a dom element. if you intentionally want it to appear in the dom as a cust..
-
[vercel 빌드 오류] Cannot find module '파일 경로' or its corresponding type declarations.error 2024. 2. 21. 11:17
로컬에서는 빌드 오류가 없었는데, Vercel로 배포 시 해당 오류가 발생했다. 로컬 저장소와 원격 저장소(git)의 파일명의 대소문자 차이가 원인이었다. git에서 파일명의 대소문자를 구분하도록 설정하여 해결하였다. git config core.ignorecase false 설정 후 파일명 변경 사항을 푸시해준다. - 참고 https://velog.io/@shyuuuuni/Vercel-Cannot-find-module-%ED%8C%8C%EC%9D%BC%EB%AA%85-or-its-corresponding-type-declarations-%EC%98%A4%EB%A5%98-%ED%95%B4%EA%B2%B0?utm_source=oneoneone
-
[vercel] vercel.json 설정error 2023. 11. 29. 16:26
vercel로 프로젝트를 배포 후 두 가지 이슈를 만났다. 1. 새로고침 시 404 에러 2. /api 경로를 받아오지 못함 // vercel.json { "rewrites": [ { "source": "/api/:path*", "destination": "https://port-0-on-hospital-2023-backend-3yl7k2bloql05nw.sel5.cloudtype.app/:path*" }, { "source": "/(.*)", "destination": "/" } ] } 두 가지 이슈 모두 인덱스 경로를 설정하여 해결하였다. 새로고침 시 알아서 해당 위치의 라우트로 이동을 시켜준다.
-
error : Content type 'application/octet-stream' not supportederror 2023. 10. 31. 14:48
회원가입 시 content type이 multipart/form-data와 application/json를 함께 보내야 했기 때문에, 합치는 로직이 필요했음 이미지 업로드를 위한 imageFormData와 데이터를 JSON 형식으로 변환한 후 Blob으로 감싼 jsonDataBlob을 따로 생성 두 개의 FormData 객체를 합쳐서 formData에 추가하고 서버로 전송 // 회원가입 export const registerMember = async ({ email, nickname, password, image, food }: registerType) => { const imageFormData = new FormData(); if (image) { imageFormData.append('file', ..
-
[error] CORS error 해결 방법error 2023. 8. 17. 14:45
지긋지긋한 CORS 에러를 마주했을 때, 내가 해결했던 방법이다. 1. cors-anywhere 오픈 프록시 서버 요청 URL 앞에 "https://cors-anywhere.herokuapp.com"을 붙이면 끗! 2021년 2월부터 데모 서버에 액세스하려면 옵트인이 필요 주기적으로 https://cors-anywhere.herokuapp.com에 들어가서 잠금 해제 버튼을 눌러야 함 결국엔 배포 시 프록시 서버를 직접 구축해야 할 듯 2. Cloudflare worker 서버리스 컴퓨팅 플랫폼으로, CDN (Content Delivery Network)을 기반으로 한 서버리스 함수 기능을 제공 worker를 생성한 뒤 서버단 코드를 작성하고 배포하면 끗! 리액트에서는 해당 worker url로 데이터를..