DmitryScaletta / twitch-dlp

Download regular/sub-only/hidden twitch VODs from start during live broadcast
https://npmjs.com/package/twitch-dlp
7 stars 0 forks source link

npm cache issue #7

Closed superbonaci closed 1 month ago

superbonaci commented 1 month ago

any idea why this happens

$ npx twitch-dlp 'https:/www.twitch.tv/videos/2203484052'
sh: /Users/memetix_/.npm/_npx/763cebf32e68a1b9/node_modules/.bin/twitch-dlp: Permission denied
superbonaci commented 1 month ago

Happens too in 🔖 v0.2.3 so something must have changed.

DmitryScaletta commented 1 month ago

I don't know why it happens. It works fine for me.

You can try to clear the npx cache: https://stackoverflow.com/a/66019858

P.S. You also forgot one slash after : in your link.

$ npx twitch-dlp https://www.twitch.tv/videos/2203484052 -F
Downloading video access token
Downloading video metadata
Downloading video manifest
┌─────────┬──────────────┬────────┬────────┐
│ (index) │ format_id    │ width  │ height │
├─────────┼──────────────┼────────┼────────┤
│ 0       │ 'Source'     │ '1920' │ '1080' │
│ 1       │ '720p60'     │ '1280' │ '720'  │
│ 2       │ '720p30'     │ '1280' │ '720'  │
│ 3       │ '480p30'     │ '852'  │ '480'  │
│ 4       │ '360p30'     │ '640'  │ '360'  │
│ 5       │ '160p30'     │ '284'  │ '160'  │
│ 6       │ 'Audio_Only' │ null   │ null   │
└─────────┴──────────────┴────────┴────────┘
superbonaci commented 1 month ago

yes it worked, weird issue

$ npx clear-npx-cache
Need to install the following packages:
clear-npx-cache@1.1.2
Ok to proceed? (y) y

 Starting cleaning ...

 ████████████████████████████████████████ 100% | ETA: 0s | 2/2

 Cache cleared successfully! Thanks for using our lib.
superbonaci commented 1 month ago

P.S. You also forgot one slash after : in your link.

Right, after clearing the cache fails with one slash, with 2 is fine:

$ npx twitch-dlp 'https:/www.twitch.tv/videos/2203484052'
/Users/memetix_/twitch-dlp/twitch-dlp.js:612
  throw new Error('Wrong link');
        ^

Error: Wrong link
    at parseLink (/Users/memetix_/twitch-dlp/twitch-dlp.js:612:9)
    at main (/Users/memetix_/twitch-dlp/twitch-dlp.js:678:32)
    at Object.<anonymous> (/Users/memetix_/twitch-dlp/twitch-dlp.js:820:1)
    at Module._compile (node:internal/modules/cjs/loader:1504:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1588:10)
    at Module.load (node:internal/modules/cjs/loader:1282:32)
    at Module._load (node:internal/modules/cjs/loader:1098:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:5)

Node.js v22.5.1
superbonaci commented 1 month ago

The cache happens all the time, I think it's when ffmpeg fails but can't confirm. Where should I report this bug?