db.once에러 (1) 썸네일형 리스트형 [db.on, db.once 에러]TypeError: The "listener" argument must be of type function. Received undefined // ()=>{}화살표 함수 안에 넣어주어 해결 db 연결을 하는데 이런 에러가 떴다. TypeError: The "listener" argument must be of type function. Received undefined 원인: db.on을 쓰려면 두번째 인자에 콜백함수를 넣어야 한다. db.on('error', 콜백함수) 그런데 나는 그냥 그 자리에 console.log를 넣었더니 오류가 났다. 여기서 db.on / db.once 의 의미: https://stackoverflow.com/questions/49607841/mongoose-connectiononce-what-does-it-mean when you use 'once' it signifies that the event will be called only once i.e the fi.. 이전 1 다음