From ffe4ebcacbdb7c51e90d44481f6ba4d54ffc980e Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sat, 21 Jun 2025 18:58:09 -0400 Subject: [PATCH] fix electron get-port ESM --- gui/electron/.npmrc | 1 + gui/electron/tor.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 gui/electron/.npmrc diff --git a/gui/electron/.npmrc b/gui/electron/.npmrc new file mode 100644 index 0000000..cffe8cd --- /dev/null +++ b/gui/electron/.npmrc @@ -0,0 +1 @@ +save-exact=true diff --git a/gui/electron/tor.js b/gui/electron/tor.js index d3aeca3..c8a9cdf 100644 --- a/gui/electron/tor.js +++ b/gui/electron/tor.js @@ -1,6 +1,6 @@ const { spawn } = require('child_process'); const path = require('path'); -const getPort = require('get-port'); +const getPort = (...args) => import('get-port').then(m => m.default(...args)); async function launchTor() { const socks = await getPort();