newo-2001 / MC-Modpack-Downloader

Script to download Minecraft modpacks without the need for the FTB app or Overwolf
MIT License
32 stars 4 forks source link

TypeError: download is not a function #1

Closed budak7273 closed 1 year ago

budak7273 commented 1 year ago

Windows, Node.js version 19.7.0 (installed via node version manager)

My settings.json: (I am trying to download FTB Inferno and following the modpacks.ch directions in the readme)

{
    "curseforge_api_key": "<excluded but known valid>",
    "pack_id": "99",
    "pack_version": "6475"
}

I feel like I'm missing something obvious here.

The console becomes filled with a few hundred of these (presumably one for each mod):

TypeError: download is not a function
    at download_mod (file:///D:/GitSecondary/MC-Modpack-Downloader/src/modpacks.ch.js:21:15)
    at file:///D:/GitSecondary/MC-Modpack-Downloader/src/modpacks.ch.js:35:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

The download npm package is installed, as well as all the others. I tried renaming it to downloadCall in the import and usage because of this post but the error still wasn't resolved.

newo-2001 commented 1 year ago

Can indeed reproduce, couldn't be bothered to figure out the root cause, so decided to move away from the download package altogether.

Should be working again.

Sometimes individual files may still fail for whatever reason, rerunning the script should successfully download these remaining files.

budak7273 commented 1 year ago

Much appreciated. I ran it again and got this: cmd_logs.txt

Got some of those ECONNRESET errors but they didn't appear again on another run

Didn't try to use the downloaded files in a launcher yet though. I'll report back when I do.

newo-2001 commented 1 year ago

The ECONNRESET issue should also be resolved with the latest code.