Great article. I'm using Typescript and it was giving me this error in the getKnex() function:
src/next-knex/nest-knex.service.ts:40:30 - error TS2350: Only a void function can be called with the 'new' keyword.
40 this._knexConnection = new Knex(this._NestKnexOptions);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
did a bit of quick research and the fix is this:
this._knexConnection = new (Knex as any)(this._NestKnexOptions);
Great article. I'm using Typescript and it was giving me this error in the
getKnex()
function:did a bit of quick research and the fix is this:
Keep up the great work!
dev.to/umasankarswain/how-to-updat...