Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property 'model' does not exist on type 'Application'. #1

Open
wind13 opened this issue Apr 10, 2020 · 1 comment
Open

Property 'model' does not exist on type 'Application'. #1

wind13 opened this issue Apr 10, 2020 · 1 comment

Comments

@wind13
Copy link

wind13 commented Apr 10, 2020

按照示例代码测试了一下,其中文件名 uset.ts 应该为 user.ts
类名首字母要大写,都改完了,还是有个错:

const result = await this.app.model.test.user.findOne();

这句报错:
src/app/controller/user.ts(5,35): error TS2339: Property 'model' does not exist on type 'Application'.

不知道怎么解决了……

@305088020
Copy link

Cannot read property 'User' of undefined,应该是User没有加入到model里面,不知改怎么操作

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants