0

目前从源代码构建 better-sqlite3 并且工作正常,但运行 typeorm migration:generate 最终失败,因为它使用具有不同 ABI 版本的本地节点。如果可能的话,我宁愿不必在迁移之前/之后重建。据我所知,没有节点发布正在使用电子 ABI,而且从查看电子和节点发布来看,这看起来也很难总是排队。

我尝试执行以下操作无济于事,尽管它有助于运行开玩笑测试。

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

编辑:通过修改解决这个问题:node_modules/typeorm/cli.js

对于 args 处理,将 final 替换".argv;"".parse(process.argv.slice(2));"

4

1 回答 1

0

通过修改node_modules/typeorm/cli.jsFor the args processing replace the final解决了这个问题

.argv;

.parse(process.argv.slice(2));
于 2021-11-08T22:40:44.430 回答