Error 8

[Git Error] remote: Internal Server Error

개인 프로젝트로 진행중이던 폴더를 Git에 올려놓으려고 했다. 레포를 만들고 리모트를 하고서 git push를 할때 에러가 났다. 그래서 pull 을 한뒤에 다시 push 하고 자 했으나 remote: Internal Server Error 에러가 발생했다. 구글링을 해서 해결방법을 찾아보니 git remote prune origin git gc --auto 순서대로 터미널에 입력하고 서 다시 pull 하면 잘 받아와 진다. 출처 - https://devyongsik.tistory.com/670

Error 2022.03.25

[node.js] msg : Route.get() requires a callback function but got a [object Undefined]

처음엔 너무 힘든 에러였다. 이 에러는 라우터 get 요청하는 부분의 콜백 함수가 잘못되서 나타난 것이다. 해결방법 또한 get 요청 하는 부분의 콜백 함수를 다시 설정해주면 되는 것이다. 나같은 경우엔 module.export = { asynce 함수 (req,res){ .... } 처음에 이렇게 요청과 응답이 모듈 앞 함수에 인자로 설정되어 있었다. 이럴때 Route에 연결되있는 JS파일이 콜백함수로 인식이 되지 않기 때문에 Route.get() requires a callback function but got a [object Undefined] 에러가 났었다. 해결 방법 module.exports = async (req,res)=>{ const checkedToken = isAuthorized(r..

Error 2022.01.29

ERROR 1364: Field 'createdAt' doesn't have a default value

기존 mysql 의 'createdAt' 와 'updatedAt'는 자동으로 입력이 되나 sequlize 에서 'createdAt' 와 'updatedAt'를 allowNull false 로 설정해두고 Users 테이블에 Insert 하려고 할때 발생하는 에러이다. 해결방법 'createdAt' 와 'updatedAt'에 defaulteValue를 설정해주면 된다. 어떻게 설정하는가 createdAt: { allowNull: false, type: Sequelize.DATE, defaultValue: Sequelize.fn("NOW"), //이렇게 수정! }, updatedAt: { allowNull: false, type: Sequelize.DATE, defaultValue: Sequelize.fn("..

Error 2022.01.29

ERROR 1364: Field 'createdAt' doesn't have a default value

문제 기존에 mysql을 쓸때에는 createdAt, updatedAt은 따로 설정을 해주지 않아도 자동으로 생성되었다. 그런데, sequelize의 createdAt과 updatedAt의 allowNull을 false로 설정하고, Users 테이블에 데이터를 insert하려고 하니 위와 같은 에러가 발생했다. Default값을 설정하라는 에러이다. 해결법 createdAt: { allowNull: false, type: Sequelize.DATE, defaultValue: Sequelize.fn("NOW"), //이렇게 수정! }, updatedAt: { allowNull: false, type: Sequelize.DATE, defaultValue: Sequelize.fn("NOW"), }, 참조 ht..

Error 2022.01.21

[ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

HA 테스트 중 이 오류를 만나게 되었다. 처음 보는 오류였고 구글링으로 쉽게 해결 할 수 있었다. HA 테스트를 하는 중에는 정신이 없기에 일단 구글링한 블로그만 체크해 두고 나중에 다시 오류를 재현해서 블로깅할 예정있으나 재현이 되지 않는다. 어떤 상황이었는지 기억이 나질 않아 구글링했던 블로그를 참고해 어떤 상황에서 이 오류가 발생 했는지 알아보자 [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client 에러 는 서버가 클라이언트에게 둘 이상의 응답을 하려고 할때 발생하는 에러이다..

Error 2022.01.13