webtorrent / bittorrent-tracker

🌊 Simple, robust, BitTorrent tracker (client & server) implementation
https://webtorrent.io
MIT License
1.72k stars 314 forks source link

Tracker does not launch #515

Closed yifu closed 3 months ago

yifu commented 3 months ago

What version of this package are you using?

parallels@ubuntu-linux-22-04-02-desktop:~$ npm list -g
/usr/local/lib
└── bittorrent-tracker@11.0.2

What operating system, Node.js, and npm version?

parallels@ubuntu-linux-22-04-02-desktop:~$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
PRETTY_NAME="Ubuntu 22.04.4 LTS"
[...]
parallels@ubuntu-linux-22-04-02-desktop:~$ nodejs --version
v12.22.9
parallels@ubuntu-linux-22-04-02-desktop:~$ npm --version
8.5.1

What happened? I've installed Bittorrent-tracker and I am trying to launch it. But I have this error message:

parallels@ubuntu-linux-22-04-02-desktop:~$ bittorrent-tracker 
file:///usr/local/lib/node_modules/bittorrent-tracker/node_modules/@thaunknown/simple-peer/lite.js:513
          if (!this.initiator) this._requestMissingTransceivers?.()
                                                                ^

SyntaxError: Unexpected token '.'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
parallels@ubuntu-linux-22-04-02-desktop:~$ 

What did you expect to happen? The command should block and provide the tracker service.

Are you willing to submit a pull request to fix this bug? No.

SilentBot1 commented 3 months ago

Hey @yifu,

It appears that the version of NodeJS required to run bittorrent-tracker was bumped to a minimum of NodeJS 14 as of the v10.0.10 version released in Jun 16, 2023, you would need to run at minimum NodeJS 14 (or higher) to run bittorrent-tracker successfully and not the listed >=12.20 in the package.json.

I would recommend not running such out of date (and no longer supported version) and pumping to NodeJS 20 if you're able, which runs the tracker perfectly fine.

If you have any issues following updating your version of node, please re-open this issue and let me know.