문제 해결(6)
-
MongoBulkWriteError: you are over your space quota, using 550 MB of 512 MB at resultHandler 해결하기
MongoBulkWriteError: you are over your space quota, using 550 MB of 512 MB at resultHandler에러 해결하기 문제 상황 읽기 성능 테스트를 위해 100만건의 가짜 데이터를 생성하던 중 MongoBulkWriteError: you are over your space quota, using 550 MB of 512 MB at resultHandler 에러 발생. 몽고디비의 users 콜렉션을 보니 원래는 100만 건의 유저 데이터가 들어가야했는데 635964 약 63만건의 데이터만 들어감 에러 메시지 { ok: 0, code: 8000, codeName: 'AtlasError', writeErrors: [], result: BulkWrite..
2022.12.08 -
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client 에러 해결
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client 에러 해결 Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client at new NodeError (node:internal/errors:393:5) at ServerResponse.setHeader (node:_http_outgoing:607:11) at ServerResponse.header (/Users/yuyu/project-3/node_modules/express/lib/response.js:794:10) at ServerResponse.send (/Use..
2022.12.06 -
Joi 폼으로 날린 데이터 못받아오는 문제 (Undefined) :: 트러블 슈팅
Joi 폼데이터 Undefined 문제 목차 - 문제 상황 - 문제 원인 - 문제 해결 - 결론 - 참고자료 문제 상황 조이를 사용해 유효성 검증 미들웨어를 만들었고 포스트맨으로 form 데이터 요청을 날렸는데 데이터를 아예 받아오지 못하는 문제 발생 아래 콘솔에 찍힌 value값을 보면 분명히 폼으로 전송했는데도 불구하고 객체 안에 아무 값도 들어있지 않은 것을 볼 수 있다. 폼으로 날리면 위처럼 required 조건에 걸려서 에러메시지가 뜨는데 이렇게 json 바디로 날리면 nickname을 잘 받아와서 다음 조건까지 가는 것을 볼 수 있다. 왜 폼데이터로 날린 값만 못받아올까? 문제 원인 문제를 해결할 수 있는 힌트는 body-parser 공식 문서에 나와있었다. body-parser 가 multi..
2022.11.28 -
Collection' object is not callable. If you meant to call the 'insert' method on a 'Collection' object it is failing because no such method exists. MongoDB 에러 해결
TypeError: 'Collection' object is not callable. If you meant to call the 'insert' method on a 'Collection' object it is failing because no such method exists. MongoDB 에러 해결하기 typeError: 'Collection' 개체를 호출할 수 없습니다. 'Collection' 개체에 대해 'insert' 메서드를 호출하려는 경우 해당 메서드가 없기 때문에 실패합니다. 라는 몽고디비 오류가 발생했다. 🤦♂️ 오류 원인 몽고DB에서 이제 insert 메소드를 더 이상 지원하지 않는다고 한다. 따라서 insert_one()이나 insert_many() 메소드를 이용해서 코드를 작..
2022.09.10 -
Import "pymongo" could not be resolved 오류 해결 방법
Import "pymongo" could not be resolved -비주얼스튜디오코드 오류 해결 🤦♂️ 문제 상황 비쥬얼스튜디오에서 pymongo를 사용하려 한다. 그래서 pip 명령어를 이용해 pymongo 패키지를 설치했다. 그런데 Import "pymongo" could not be resolved라는 pymongo 패키지를 불러올 수 없다는 에러 발생 아마 여기까지가 이 글을 읽는 모든 분들이 마주쳐버린 문제 상황일 것이다. 코드 작성을 시작하기도 전에 이런 문제가 발생해버리면 골이 지끈지끈 아파온다. 자 어떻게 해결해야 할까? 여기 아주 깔끔한 해결법이 준비되어있다. 이 방법이면 거의 대부분의 분들이 아주 쉽고 성공적으로 pymongo 패키지를 깔 수 있을 것이다. 💁♂️ 그럼 함께 해결..
2022.09.10 -
Address already in use Port 5000 is in use by another program 플라스크 에러 해결하기 [Flask errors]
Address already in use Port 5000 is in use by another program. 플라스크 에러 해결하기 [Flask errors] Flask를 실행했는데 Address already in use Port 5000 is in use by another program. Either identify and stop that program, or start the server with a different port. On macOS, try disabling the 'AirPlay Receiver' service from System Preferences -> Sharing. 이런 에러 코드가 나올 때 오류의 원인과 오류 해결 방법은 다음과 같다. ✅ 오류의 원인 플라스크 서버는..
2022.08.24