在electron开发客户端的时候,使用typeorm作为数据库处理框架。在开发的时候,是没有问题的 ,但是打包之后,运行会出现如下错误 No repository for "xxx" was found. Looks like this entity is not registered in current "default" connection 原因是,开发环境是使用ormconfig.json作为typeorm配置文件的,配置如下 {
"type": "mysql",
"synchronize": true,
"logging": true,
"host": "xxx....