Currently building better-sqlite3 from sources and that works fine but running typeorm migration:generate ends up failing as it uses my local node which has a different ABI version. I would prefer not to have to rebuild before/after migrations if at all possible. From what I can tell no node release is using the electron ABI and that also looks difficult to line up always from looking at electron & node releases.
I tried doing the following to no avail though it helped out for running jest tests.
yarn ELECTRON_RUN_AS_NODE=true ./node_modules/.bin/electron -r ts-node/register ./node_modules/.bin/typeorm -f path/to/ormconfig.ts migration:generate -n MigrationName
EDIT: Got around this by modifying: node_modules/typeorm/cli.js
For the args processing replace the final ".argv;"
with ".parse(process.argv.slice(2));"