model.query is not a function error #3229
Unanswered
brunoandreotti
asked this question in
Help
Replies: 1 comment 3 replies
-
Not sure if anyone help without looking at the code |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm trying to do a simple auth method but when I try to login using the seed that I created at my database, I'm getting this error:
"type": "TypeError",
"message": "model.query is not a function",
"stack":
TypeError: model.query is not a function
at LucidProvider.getModelQuery (C:\Users\bruno\Desktop\facebook-clone-api\facebook-api\node_modules@adonisjs\auth\build\src\UserProviders\Lucid\index.js:52:26)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at LucidProvider.findByUid (C:\Users\bruno\Desktop\facebook-clone-api\facebook-api\node_modules@adonisjs\auth\build\src\UserProviders\Lucid\index.js:128:27)
at OATGuard.lookupUsingUid (C:\Users\bruno\Desktop\facebook-clone-api\facebook-api\node_modules@adonisjs\auth\build\src\Guards\Base\index.js:65:30)
at OATGuard.verifyCredentials (C:\Users\bruno\Desktop\facebook-clone-api\facebook-api\node_modules@adonisjs\auth\build\src\Guards\Base\index.js:133:30)
at OATGuard.attempt (C:\Users\bruno\Desktop\facebook-clone-api\facebook-api\node_modules@adonisjs\auth\build\src\Guards\Oat\index.js:204:22)
at AuthController.store (C:\Users\bruno\Desktop\facebook-clone-api\facebook-api\app\Controllers\Http\Auth\Main.ts:8:19)
at Object.PreCompiler.runRouteHandler [as fn] (C:\Users\bruno\Desktop\facebook-clone-api\facebook-api\node_modules@adonisjs\http-server\build\src\Server\PreCompiler\index.js:47:31)
at Server.handleRequest (C:\Users\bruno\Desktop\facebook-clone-api\facebook-api\node_modules@adonisjs\http-server\build\src\Server\index.js:108:13)
"status": 500
}
Can anyone help me? :)
Beta Was this translation helpful? Give feedback.
All reactions