M-rcus / yiff-dl

Downloads files from creators on Yiff
https://m-rcus.github.io/yiff-dl/
MIT License
23 stars 3 forks source link

Cannot read property 'mkdir' of undefined #10

Closed zeldatp151 closed 4 years ago

zeldatp151 commented 4 years ago

whenever I try to run yiff-dl, it always get the error "TypeError: Cannot read property 'mkdir' of undefined" as seen below.

[5/21/2020] [11:47:44 AM] › ℹ info Retrieving and filtering through all creators from Yiff to get specific creator details... [5/21/2020] [11:47:44 AM] › ℹ info This step might take a few seconds, please be patient... [5/21/2020] [11:47:46 AM] › ✔ success Found creator details: { "themes": [ "Human" ], "name": "redacted", "post_count": 270, "types": [ "Videos" ], "shared_count": 1, "last_post": 1598088666, "id": numberhere, "last_post_ago": "25 days ago", "site": "patreon" } [5/21/2020] [11:47:46 AM] › ℹ info Getting specific creator data from Yiff (posts, shared files etc.) [5/21/2020] [11:47:48 AM] › ℹ info Found 6 pages for creator numberhere. Retrieving all pages. [5/21/2020] [11:47:48 AM] › ✔ success Retrieved page #1/6 for creator: numberhere [5/21/2020] [11:47:49 AM] › ✔ success Retrieved page #2/6 for creator: numberhere [5/21/2020] [11:47:49 AM] › ✔ success Retrieved page #3/6 for creator: numberhere [5/21/2020] [11:47:50 AM] › ✔ success Retrieved page #4/6 for creator: numberhere [5/21/2020] [11:47:51 AM] › ✔ success Retrieved page #5/6 for creator: numberhere [5/21/2020] [11:47:51 AM] › ✔ success Retrieved page #6/6 for creator: numberhere [5/21/2020] [11:47:51 AM] › ✔ success Retrieved and parsed a total of 272 posts from Yiff [5/21/2020] [11:47:51 AM] › ℹ info Downloading started for creator: redacted (numberhere) [5/21/2020] [11:47:51 AM] › ▶ Yiff Download redacted Initialized timer... TypeError: Cannot read property 'mkdir' of undefined at Object.checkAndCreateDir (/usr/local/lib/node_modules/yiff-dl/helpers.js:56:18) at /usr/local/lib/node_modules/yiff-dl/index.js:263:30 at at process._tickCallback (internal/process/next_tick.js:188:7)

TheSarali commented 4 years ago

Why did you close this? I'm having the same error.

zeldatp151 commented 4 years ago

Sorry, the issue was my fault, make sure you have nodejs version 10 or higher, I was trying to run this on ubuntu 18.04 which only had nodejs 8 in its repo, so I updated to ubunutu 20.04 and installed nodejs 10. fixed everything.

TheSarali commented 4 years ago

Gotcha, thank you. I ran an update within nodejs but apparently that didn't update to the latest version of it completely. I was having the same issue, apparently. Much appreciated!

M-rcus commented 3 years ago

Sorry for never responding to this issue, never even saw (honestly don't check my closed issues much).

I've added a note in the README about Node.js versions and that I developed this for 12.x.x.

(Also sorry for necro'ing an old issue, but thought I wanna mention it)