FoalTS / foal

Full-featured Node.js framework, with no complexity. 🚀 Simple and easy to use, TypeScript-based and well-documented.
https://foalts.org/
MIT License
1.88k stars 137 forks source link

migration error : 'FindOptionsOrderProperty' circularly references itself. #1062

Closed bobwatcherx closed 2 years ago

bobwatcherx commented 2 years ago

foal : 2.8.1 node v16.14.2

npm install typeorm @foal/typeorm ormconfig.js

yarn makemigrations

i follow yout tutorial in website about use sqlite database, and after makemigrations i have error

my code : https://github.com/bobwatcherx/foaltest.git

bobwatcherx commented 2 years ago

SOLVED I made the same project but didn't follow the tutorial on the website https://foalts.org/docs/databases/typeorm I think the cause is in the version section

@foal/typeform and typeform

not supported "@foal/typeorm": "^2.8.1", "typeorm": "^0.3.5"

I copied dependencies.json the previous one

"dependencies": { "@foal/core": "^2.0.0", "better-sqlite3": "~7.5.0", "source-map-support": "~0.5.19", "typeorm": "^0.3.5" },

Becomes

"dependencies": { "@foal/cli": "^2.8.1", "@foal/core": "^2.0.0", "@foal/typeorm": "^2.0.0", "better-sqlite3": "~7.5.0", "source-map-support": "~0.5.19", "sqlite3": "^5.0.2", "typeorm": "0.2.26" }, and run yarn and yan makemigrations and it worked :)