Type 'void[]' is not assignable to type 'ReactNode'. - 에러 해결
·
Web/Error 해결
한글로 직역하면 'void[]' 형식은 'ReactNode' 형식에 할당할 수 없습니다. 의 오류 입니다. Javascript를 사용해서 개발을 할 때에는 이런 식으로 작성해도 에러가 나지 않아서 그대로 작성을 했는데 해당 오류가 발생했다.. 찾아보니 Typescript에서는 map 내부의 콜백에서 화살표 함수(=>)를 사용할 때, {} 블록을 사용하면 반드시 return 문을 사용하여 값을 반환해야 합니다. [원래 코드] const renderNotes = () => { return notes.map(note => { //이 화살표 함수 안에는 return 값 없음!!! }) } [고친 코드] const renderNotes = () => { return notes.map(note => { // => ..
'--isolatedModules' 에러 해결방법
·
Web/Error 해결
Typescript 파일을 만들어 두고 npm run start를 통해서 App을 실행하게 되면 다음과 같은 에러가 발생한다. TS1208: 'ㅁㅁㅁㅁ.tsx' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module. 단지 빈 페이지로 있어서 오류가 난 것이므로 export {} 를 입력하면 에러 해결됩니다 별게 다 에러네
GitHub API rate limit (요청한도) 늘리기
·
Web/Error 해결
깃헙 api를 사용해서 github finder를 만들고 있었는데 잘만 되던 검색이 막혀서 크롬 devTools(개발자 도구)를 살펴봤는데 { "message": "API rate limit exceeded for --내 ip--. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)", "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting" } 같은 ip로 여러번 검색하게 되면 limit가 걸리는지 제한이 걸려서 안 ..