pully icon indicating copy to clipboard operation
pully copied to clipboard

Running pully giving Error: Cannot find module 'm3u8stream/lib/parse-time' error

Open ACyphus opened this issue 5 years ago • 16 comments
trafficstars

Just freshly installed pully and seeing this error:

$ pully
internal/modules/cjs/loader.js:957
    throw err;
    ^

Error: Cannot find module 'm3u8stream/lib/parse-time'
Require stack:
- /usr/local/lib/node_modules/pully/node_modules/ytdl-core/lib/index.js
- /usr/local/lib/node_modules/pully/node_modules/pully-core/dist/index.js
- /usr/local/lib/node_modules/pully/dist/index.js
- /usr/local/lib/node_modules/pully/dist/bin/pully.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:954:17)
    at Function.Module._load (internal/modules/cjs/loader.js:847:27)
    at Module.require (internal/modules/cjs/loader.js:1016:19)
    at require (internal/modules/cjs/helpers.js:69:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/pully/node_modules/ytdl-core/lib/index.js:7:21)
    at Module._compile (internal/modules/cjs/loader.js:1121:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
    at Module.load (internal/modules/cjs/loader.js:976:32)
    at Function.Module._load (internal/modules/cjs/loader.js:884:14)
    at Module.require (internal/modules/cjs/loader.js:1016:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/pully/node_modules/ytdl-core/lib/index.js',
    '/usr/local/lib/node_modules/pully/node_modules/pully-core/dist/index.js',
    '/usr/local/lib/node_modules/pully/dist/index.js',
    '/usr/local/lib/node_modules/pully/dist/bin/pully.js'
  ]
}

Any suggestions on how to fix?

macOS 10.15.2 npm 6.13.4 node 13.2.0

ACyphus avatar Dec 16 '19 16:12 ACyphus

My guess is that's an error in ytdl-core. @fent Do you have any insight on this?

jimbuck avatar Dec 17 '19 17:12 jimbuck

this was an error in ytdl-core <= v1.0.0, it was fixed in v1.0.1

fent avatar Dec 17 '19 18:12 fent

$ ytdl --version
1.1.0

I've also tried running:

$ npm install -g ytdl-core@latest

+ [email protected]
updated 1 package in 0.441s

I'm still getting the same error though. How can I ensure I'm using the fixed version of ytdl-core?

ACyphus avatar Dec 17 '19 18:12 ACyphus

Feel free to make a PR updating pully. I can test it later today and release it to npm.

jimbuck avatar Dec 17 '19 19:12 jimbuck

@ACyphus Just a guess, but try navigating to your global node_modules directory and find pully. Within there try running npm i ytdl-core@latest. Then run the pully command.

jimbuck avatar Dec 17 '19 19:12 jimbuck

Feel free to make a PR updating pully. I can test it later today and release it to npm.

@jimbuck I'm not super familiar with node. I'm presuming this requires updating the ytdl-core dependency in pully-core? https://github.com/jimbuck/pully-core/blob/master/package.json#L38

@ACyphus Just a guess, but try navigating to your global node_modules directory and find pully. Within there try running npm i ytdl-core@latest. Then run the pully command.

$ npm i ytdl-core@latest
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/linux-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"linux","arch":"arm"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/linux-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"linux","arch":"arm64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/linux-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"linux","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/linux-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"linux","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/win32-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"win32","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/win32-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"win32","arch":"x64"} (current: {"os":"darwin","arch":"x64"})

+ [email protected]
updated 1 package and audited 192 packages in 3.03s
found 0 vulnerabilities

I still get the same error when running pully though.

ACyphus avatar Dec 17 '19 19:12 ACyphus

@ACyphus Thanks for trying that. I should have some time tonight (6'ish hours from now) to update the references on everything and test it all. I'll post any updates here.

jimbuck avatar Dec 17 '19 20:12 jimbuck

Thanks @jimbuck ✨ absolutely no rush from my side by the way

ACyphus avatar Dec 17 '19 20:12 ACyphus

Just FYI, this is still on my mind, I will take a stab at it tonight.

jimbuck avatar Dec 20 '19 20:12 jimbuck

pully-core is now updated. Working on updating pully next.

jimbuck avatar Dec 23 '19 19:12 jimbuck

er I don't even know what pully is but I have a browser extension that uses ytdl-core and apparently updating to the latest version (which is a new major) solved the issue for me

MicroDroid avatar Jan 04 '20 17:01 MicroDroid

I still have the same error, tried installing the latest ytdl but this gave me the same warning messages as @ACyphus.

SpoOkyJelle avatar Mar 23 '20 18:03 SpoOkyJelle

$ ytdl --version
1.1.0

I've also tried running:

$ npm install -g ytdl-core@latest

+ [email protected]
updated 1 package in 0.441s

I'm still getting the same error though. How can I ensure I'm using the fixed version of ytdl-core?

don't install a node library globally. node will prioritize local modules over global ones.

if you want to debug this more, look at your package-lock.json file and see any entries for ytdl-core and what is requiring an older version, if anything.

fent avatar Mar 23 '20 19:03 fent

Temporary fix.

cp -r ./node_modules/m3u8stream/dist ./node_modules/m3u8stream/lib

colshacol avatar Nov 05 '20 02:11 colshacol

in /node_modules/ytdl-core/lib/index.js change 'm3u8stream/lib/parse-time to 'm3u8stream/dist/parse-time

qnxdev avatar Sep 24 '21 13:09 qnxdev

I think the latest tag reference a version that depends on the 0.7.2 release of pully-core which depends on the 0.28.0 release of ytdl-core, which incorrectly references m3u8stream/lib/parse-time instead of m3u8stream/dist/parse-time.

Could this mean that anyone who installs pully using npm i pully will get a broken version? That's what happened to me, but I don't know for sure.

Is the solution for the maintainer to create a new tag that references a version of pully that has the up to date dependencies?

vinceTheProgrammer avatar Feb 14 '23 18:02 vinceTheProgrammer