Issues importing a class in the provider folder of AdonisJS while creating TypeScript definitions.
Could anyone help me with an issue I'm facing while building a database wrapper for Prisma in adonis? I am trying to create a typescript definition for it, but I'm unable to import the
Database
class from providers/DatabaseProvider/database.ts
. I've tried recreating the project multiple times, but the issue persists. Thank you smmmm
contracts/DatabaseProvider/database.ts
providers/DatabaseProvider/index.ts
providers/DatabaseProvider/database.ts
5 Replies
did you add into the
.adonisrc.json
file?
like thisyup, this is my
.adonisrc.json
file
also to be clear this is the error that I got.
try moving out of the folder
like
/contracts/database.ts
im using mongoose, but should be the same for prisma
yup, still the same
Hey, umm, I fixed it. I searched through the issues in the Adonis/core repo on GitHub, and it seems that there are some issues when using PNPM (which is what I've been using the whole time), so I switched to Yarn, and it's now working fine! Thank youuu.