작성
·
564
0
TypeError: User.find is not a function at D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\routes\auth.js:13:35 at Layer.handle [as handle_request] (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\layer.js:95:5) at next (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\route.js:137:13) at exports.isNotLoggedIn (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\routes\middlewares.js:14:9) at Layer.handle [as handle_request] (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\layer.js:95:5) at next (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\layer.js:95:5) at D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:281:22 at Function.process_params (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:335:12) at next (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:275:10) at Function.handle (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:174:3) at router (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:47:12) at Layer.handle [as handle_request] (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:317:13) at D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:284:7 at Function.process_params (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:335:12) at next (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:275:10) at D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:635:15 at next (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:260:14) at Function.handle (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:174:3) at router (D:\_Node.js\_NodeStudy_inflearn\Node-Study\NodeSNS\nodebird\node_modules\express\lib\router\index.js:47:12)
오류가 이렇게 나옵니다...
하지만 저는 auth.js 설정이 되어있습니다.
models/user.js도 이렇게 설정이 되어있습니다.
제대로 적었다고 생각했었는데 User.find 가 없다고 하네요 .
참고로 회원가입할 때 생기는 오류입니다.
깃허브 필요하시면 첨부해드릴게요!!
답변 7
1
0
0
0
0
0
0