Closed rageshkrishna closed 1 year ago
This is user error. I missed the fact that 10.x is ESM only and hadn't updated my configs to reflect that. Sorry about the noise.
For anyone else that runs into this, set "type": "module"
in your package.json
.
For others running into this, after setting "type": "module"
in your package.json
file, you import like so:
import { Server, Client } from 'bittorrent-tracker'
What version of this package are you using? ^10.0.2
What operating system, Node.js, and npm version? Node 18.14.2, npm 9.5.0
What happened? I did
npm install bittorrent-tracker
and tried to run the following code withnode index.js
The output is:
What did you expect to happen? Something gets dumped to the console.
Are you willing to submit a pull request to fix this bug? Yes, but I'm not sure I understand what's broken yet.