tusharmath / Multi-threaded-downloader

A http file downloader made in nodejs
MIT License
194 stars 90 forks source link

createDownload is not a function..... #195

Open deeptigoyal01 opened 6 years ago

deeptigoyal01 commented 6 years ago

I added the package. and tried below given code:-

var createDownload = require('mt-downloader').createDownload var url = 'https://upload.wikimedia.org/wikipedia/commons/4/47/Gadget_the_pug_expressive_eyes.jpg'; var path = '/Users/tusharmathur/Desktop/temp/Gadget_the_pug_expressive_eyes.jpg'; var downloader = createDownload({path, url}); downloader.start() // returns an observable

it is returning me error as belows:- var downloader = createDownload({path, url}); ^

TypeError: createDownload is not a function at Object. (D:\NODE\NODE_CODEBASE\DownloadManager\routes\download_router.js:14:18) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (D:\NODE\NODE_CODEBASE\DownloadManager\server.js:51:19) at Module._compile (module.js:652:30)

please help me here...........