Extension not working in .AppImage

My custom extension works when tried with yarn electron start, but fails when the application is packaged to a .AppImage. The error I get is pretty lengthy :

root INFO Request interfaceToSchema failed with message: Cannot find global type 'Array'.

Cannot find global type 'Boolean'.

Cannot find global type 'Function'.

Cannot find global type 'IArguments'.

Cannot find global type 'Number'.

Cannot find global type 'RegExp'.

File '/tmp/.mount_TheiaBwh4RW6/resources/app/node_modules/ts-json-schema-generator/node_modules/typescript/lib/lib.d.ts' not found.
  The file is in the program because:
    Default library for target 'es5'

A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.

Cannot find name 'Symbol'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

Cannot find name 'Iterator'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

Cannot find name 'ArrayBuffer'.

Cannot find name 'ArrayBuffer'.

File '/tmp/.mount_TheiaBwh4RW6/resources/app/node_modules/ts-json-schema-generator/node_modules/typescript/lib/lib.dom.d.ts' not found.

Cannot find name 'ArrayBuffer'.

Cannot find name 'Promise'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

Cannot find name 'ArrayBuffer'.


Cannot find name 'Response'.

Cannot find name 'ArrayBuffer'.

Cannot find name 'Error'.

Cannot find name 'Promise'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

Cannot find name 'ArrayBuffer'.

The error basically is filled with similar messages, I’m wondering what would cause this. Somehow the backend service does not find these types/names. This only happens if the application is packaged with the electron packager.