본문 바로가기

Log/Trouble shoot21

500 Error∵accessing deconstructed value(undefined) Situation Frontend team reported 500 error on production server which is internal server-related error Cause the property deconstruction error It is caused because code tried to deconstruct undefined property. { "statusCode": 500, "status": "TypeError", "message": "Cannot destructure property 'appName' of 'appDict.get(...)' as it is undefined." } async getUser(getUserDto: GetUserDto): Promise { .. 2023. 9. 22.
node.js_복잡한 형식의 private_key를 .env 환경변수로 사용하는 방법 서드파티에서 받은 private_key 정보 중 '--------BEGIN PRIVATE KEY----\n.......\n...' 이런 형식의 포맷을 가진 경우가 있다. 이런 키들을 `process.env.private_key`와 같이 곧바로 가져오게 되면 잘 적용이 안된다. \n 이스케이프 문제인데, 그런 경우 아래와 같이 정규표현식으로 수정해주면 된다. private_key: process.env.PRIVATE_KEY.replace(/\\n/g, '\n'), https://stackoverflow.com/questions/55459528/using-private-key-in-a-env-file 2023. 8. 1.
Docker-mysql-access denied for user...(using password YES) Error : [Docker][MySQL]Access denied for user ‘’@’172.17.0.1'(using password: YES) nest.js에서 mysql을 sequelize로 설정한 후 어플리케이션을 실행하려는데, 이런 에러가 발생했다. mysql의 접근 권한이 없어서 발생한 문제로 보인다. # root 유저로 접근 $ docker exec -it mysql -uroot -p비밀번호를 잊었을 경우? 여기서 비밀번호를 치라고 나오는데 만약 비밀번호를 잊었으면 $ docker exec env을 치면 알 수 있다. 비밀번호를 치면 mysql로 잘 접속한다. CREATE USER 'thursdaycurry'@'172.17.0.1' IDENTIFIED B.. 2023. 6. 7.
nestjs_ ERROR [ExceptionHandler] Nest can't resolve dependencies [Nest] 11601 - 06/07/2023, 3:11:11 PM ERROR [ExceptionHandler] Nest can't resolve dependencies of the MarketwatcherService (?). Please make sure that the argument MarketwatcherRepository at index [0] is available in the MarketwatcherModule context. Potential solutions: - Is MarketwatcherModule a valid NestJS module? - If MarketwatcherRepository is a provider, is it part of the current Marketwatc.. 2023. 6. 7.