--Outstanding promises-- error

17 views
Skip to first unread message

Savad k.s

unread,
Jun 30, 2017, 5:48:30 AM6/30/17
to nodejs
var Torrent = require('webseeded-torrent-generator');
var fs = require('fs');
var base = 'http://ia700201.us.archive.org/6/items/';
var name = 'jj2005-02-27.fm.shnf';
var files = [
    'jj2005-02-27.fm.d1.md5',
    'jj2005-02-27.fm.d1.txt'
];
 
var torrent = new Torrent(base, name, files);
torrent.getMetadata().then(function (buf) {
    fs.writeFileSync('tmp.torrent', buf);
});

When i try to run this code i am getting an message telling that outstanding promises and some other junk of data, instead of writing a torrent . Can anyone can help me to fix it
Reply all
Reply to author
Forward
0 new messages