diff --git a/app/src/app-env.ts b/app/src/app-env.ts index 37b113b63..ebb98e973 100644 --- a/app/src/app-env.ts +++ b/app/src/app-env.ts @@ -62,7 +62,7 @@ export default class AppEnvConstructor { // Add 'src/global/' to module search path. const globalPath = path.join(resourcePath, 'src', 'global'); - require('module').globalPaths.push(globalPath); + require('app-module-path').addPath(globalPath); const Config = require('./config').default; const KeymapManager = require('./keymap-manager').default; diff --git a/package.json b/package.json index 52dd14e53..ca7768923 100644 --- a/package.json +++ b/package.json @@ -50,9 +50,10 @@ "@types/uuid": "^3.4.4", "@typescript-eslint/eslint-plugin": "^4.7.0", "@typescript-eslint/parser": "^4.7.0", + "app-module-path": "^2.2.0", "chalk": "1.x.x", "devtron": "^1.4.0", - "electron": "14.2.1", + "electron": "17.1.1", "electron-installer-dmg": "^3.0.0", "electron-packager": "15.2.x", "electron-winstaller": "2.x.x",