You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected output is all torrent files are downloaded under the torrents folder. The same code works perfectly with node, without even having to add "trustedDependencies": ["node-datachannel"] in package.json
What do you see instead?
While running this with bun, the folders are created, but it gives an error while writing the files to disk.
error: UV_ENOENT
errno: -4058
syscall: "open"
path: "C:\Temp\Npm projects\webtorrent_sample\torrents\Python Programming And Maching Learning Understanding How To Code Within 24 Hours 2 In 1\Please Consider Making A Donation\QR Code For Donations.jpg"
Additional information
No response
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.1.29+6d43b3662
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
index.js
`
import WebTorrent from 'webtorrent';
const client = new WebTorrent();
const magnet_url = '0D4AF725CC7CDF3CE933E5BFF8C0B3A6ED6E0D93';
const torrentOps = (magnetURI) => (torrent) => {
torrent.on('download', downloadOp(torrent));
torrent.on('done', doneOp(client, magnetURI, torrent));
};
client.add(
magnet_url,
{
announce: [
'udp://tracker.opentrackr.org:1337/announce',
'http://tracker.opentrackr.org:1337/announce',
'udp://open.demonii.com:1337/announce',
'udp://open.stealth.si:80/announce',
'udp://tracker.torrent.eu.org:451/announce',
'udp://exodus.desync.com:6969/announce',
'https://tracker.tamersunion.org:443/announce',
'udp://tracker1.bt.moack.co.kr:80/announce',
],
path: './torrents',
},
torrentOps(magnet_url)
);
const downloadOp = (torrent) => (bytes) => {
const { downloaded, downloadSpeed, progress, timeRemaining, infoHash } =
torrent;
console.info(
downloadSpeed = ${downloadSpeed}
);};
const doneOp = (client, magnetURI, torrent) => () => {
console.info(
Torrent ${torrent.name} download finished
);client.remove(magnetURI, (err) => {
console.warn(err ?? 'Torrent removed');
});
};
`
package.json
{ "name": "webtorrent_sample", "version": "1.0.0", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "description": "", "dependencies": { "webtorrent": "^2.5.1" }, "type": "module", "trustedDependencies": [ "node-datachannel" ] }
What is the expected behavior?
Expected output is all torrent files are downloaded under the torrents folder. The same code works perfectly with node, without even having to add "trustedDependencies": ["node-datachannel"] in package.json
What do you see instead?
While running this with bun, the folders are created, but it gives an error while writing the files to disk.
error: UV_ENOENT
errno: -4058
syscall: "open"
path: "C:\Temp\Npm projects\webtorrent_sample\torrents\Python Programming And Maching Learning Understanding How To Code Within 24 Hours 2 In 1\Please Consider Making A Donation\QR Code For Donations.jpg"
Additional information
No response
The text was updated successfully, but these errors were encountered: