Closed gkorland closed 1 year ago
Just tried with the latest next:"13.5.5" and I'm still getting the same error
@balazsorban44
I found the issue: If the application redefines the entities used by the TypeORM-Adapter (like I do) As explained in https://authjs.dev/reference/adapter/typeorm#advanced-usage
After Next 13.5 it seems like Next is shortening the classnames in build time, e.g. from AccountEntity to a The problem is that TypeORM is using the classname by default for the class lookup. The solution is to set the classname in the decorator e.g.
@Entity("AccountEntity", { name: "accounts" })
export class AccountEntity {
@balazsorban44 I suggest to fix the docs
Environment
System: OS: Linux 6.2 Ubuntu 23.04 23.04 (Lunar Lobster) CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz Memory: 5.44 GB / 31.06 GB Container: Yes Shell: 5.2.15 - /bin/bash Binaries: Node: 17.6.0 - ~/.nvm/versions/node/v17.6.0/bin/node npm: 8.5.1 - ~/.nvm/versions/node/v17.6.0/bin/npm pnpm: 8.7.4 - ~/.nvm/versions/node/v17.6.0/bin/pnpm Browsers: Chrome: 117.0.5938.149
Reproduction URL
https://github.com/FalkorDB/falkordb-cloud/
Describe the issue
After I upgrade to the latest version I started to get this error:
"typeorm": "^0.3.17" "@auth/typeorm-adapter": "^1.0.4"
How to reproduce
Expected behavior
Login without any error