I have a feeling that the problem is likely related with the way you installed the module or with webpack configuration.
If you installed typeorm with npm, it is possible that the module is not in the proper node-modules folder:
did you install it with npm using --save?
install typeorm --save
if that’s so typeorm should be listed as dependence in the package.json and it will be installed in a local way for your program; however If you installed it globally (without --save) it wont work. That is because electron uses its own node and it probably wont use your system’s global modules (using global modules would be a bad idea, because if they could access to them, that would mean that your executable would only work in computers that have already installed that package).
If that’s not the problem, take a look to your webpack configuration; I am not an expert on it, but I do know that some webpack configurations limit the things that will be packaged in the executable’s asar file, the node-modules dependencies and in the non-asar source files.