-
Notifications
You must be signed in to change notification settings - Fork 669
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
Issue with adapter for adminjs/mongoose #1697
Comments
I haven't used However, you might be missing |
Hey @dziraf, thank you for responding. I'm relatively new to nodejs. Can you please explain me what do you mean by mongoose. With what should I compare @nestjs/mongoose to? Sorry, I didn't provide my main.ts, here is where I register the adapter.
|
AdminJS.registerAdapter({
Resource: AdminJSMongoose.Resource,
Database: AdminJSMongoose.Database,
}); Try placing that before
Every adapter ( Alternatively, try providing |
Greate, with AppointmentSchema it managed to register the adapter. I have noticed another issue on this repo with exactly the same error. Did you manage to reproduce the error after pulling the repo. I have tracked issue, it is located in node_modules/@adminjs/mongoose/lib/resource.js If I change to 'this.MongooseModel.paths' it works, but again other things don't work. |
Hello @dziraf, I can't make it work, what ever I do. Do you have any more suggestions? |
Hey @dziraf, I managed to make it work by exporting another class from my schema.ts
Now I have db connection problems, I assume that CityModel class doesn't have to do anything with db connection? error: |
Contact Details
No response
What happened?
After starting application I receive this error: There are no adapters supporting one of the resource you provided.
I'm using @adminjs/mongoose adapter.
Bug prevalence
always
AdminJS dependencies version
"dependencies": {
"@adminjs/express": "^6.1.0",
"@adminjs/mongoose": "^4.1.0",
"@adminjs/nestjs": "^6.1.0",
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.2.2",
"@nestjs/core": "^10.0.0",
"@nestjs/jwt": "^10.2.0",
"@nestjs/mongoose": "^10.0.6",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/throttler": "^5.2.0",
"@nestjs/typeorm": "^10.0.2",
"@types/nodemailer": "^6.4.15",
"@vercel/node": "^3.1.7",
"bcrypt": "^5.1.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"compression": "^1.7.4",
"express-formidable": "^1.2.0",
"express-session": "^1.18.0",
"firebase-admin": "^12.2.0",
"handlebars": "^4.7.8",
"helmet": "^7.1.0",
"mongodb": "^5.9.2",
"mongoose": "^8.4.3",
"nanoid": "^3.3.7",
"nestjs-seeder": "^0.3.2",
"nodemailer": "^6.9.14",
"passport": "^0.7.0",
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
"slugify": "^1.6.6",
"typeorm": "^0.3.20",
"zod": "^3.23.8"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.3.10",
"@types/bcrypt": "^5.0.2",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@types/passport-jwt": "^4.0.1",
"@types/passport-local": "^1.0.38",
"@types/supertest": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
}
What browsers do you see the problem on?
Chrome
Relevant log output
Relevant code that's giving you issues
The text was updated successfully, but these errors were encountered: