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

Object is of type 'unknown'. error #3

Open
arun99178 opened this issue Aug 29, 2021 · 2 comments
Open

Object is of type 'unknown'. error #3

arun99178 opened this issue Aug 29, 2021 · 2 comments

Comments

@arun99178
Copy link

{
"version": "1.0.0",
"main": "index.js",
"scripts": {
"dev": "nodemon --config nodemon.json source/app.ts"
},
"license": "MIT",
"dependencies": {
"bcrypt": "^5.0.1",
"config": "^3.3.6",
"cors": "^2.8.5",
"dayjs": "^1.10.6",
"express": "^4.17.1",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.21",
"mongoose": "^6.0.2",
"nanoid": "^3.1.25",
"pino": "^6.13.1",
"pino-pretty": "^6.0.0",
"yup": "^0.32.9"
},
"devDependencies": {
"@types/bcrypt": "^5.0.0",
"@types/body-parser": "^1.19.1",
"@types/config": "^0.0.39",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
"@types/jsonwebtoken": "^8.5.5",
"@types/lodash": "^4.14.172",
"@types/mongoose": "^5.11.97",
"@types/nanoid": "^3.0.0",
"@types/node": "^16.7.5",
"@types/pino": "^6.3.11",
"@types/yup": "^0.29.13",
"ts-node": "^10.2.1",
"typescript": "^4.4.2"
}
}

With this package's code not run. get error
source/controller/user.controller.ts:12:33 - error TS2571: Object is of type 'unknown'.

Please give feedback how to solve.

@LiaqatSaeed
Copy link

Try using lower version for mongoose look into example repo Package.json file

@arun99178
Copy link
Author

How to fix it in with "mongoose": "^6.0.2", version.

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