error2 [JavaScript] fetch함수에서의 에러(Error) 처리 react환경에서의 fetch 함수로 api요청한 실습 // fetch함수를 통한 GET요청 -> 데이터를 가져옴 fetch('https://주소.json') // then함수를 사용해 가져온 데이터를 출력 .then ((response) => { // callback함수 return response.json() }) // 파싱한 결과를 출력해 볼 때 .then ((result) => { console.log(result) }) [에러 처리] fetch('https://주소.json') .then ((response) => { return response.json() }) .then ((result) => { console.log(result) }) // 에러처리 .catch(() => { console.. 2021. 11. 22. [Git]깃 설치 오류 homebrew-core is a shallow clone 왜 맨날 나만 오류나...?🤯 1. Homebrew 설치 https://brew.sh/ Homebrew The Missing Package Manager for macOS (or Linux). brew.sh 이 코드를 복사해서 설치하는데 뭔가 신통치 않았다. any key어쩌고 하는 글이 나오면 enter키를 눌러야함. 2. error만남 homebrew-core is a shallow clone 이런 코드를 시작으로 메시지가 왕창 뜬다. 여기서 엄청난 방황을 시작함. shallow clone : git 리파지토리의 전체 이력 중 일부만 받아오는 행위(실제 객체를 복사하지 않고 레퍼런스만 복사) 잘 살펴보면 first run : 어쩌고라는 경로를 알려준다. 그 경로를 그대로 복사, 붙혀넣기 해서 ente.. 2021. 9. 9. 이전 1 다음