webtorrent / bittorrent-tracker

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

npm versions > 10.0.8 will not run due to bug in simple-peer lite #488

Closed MasterEvilAce closed 1 year ago

MasterEvilAce commented 1 year ago

I am using bittorrent-tracker via NPM and for versions newer than 10.0.8 the script is generating an error and does not run.

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)

ThaUnknown commented 1 year ago

thats an issue with your AST parser used by your bundler, or outdated version of node, this is valid syntax, its modern syntax, so it might be unsupported by older engines, at which point i'd recommend transpiling the lib using webpack