videojs / m3u8-parser

An m3u8 parser.
Other
473 stars 98 forks source link

4.5.1 with Typescript crash (vhs-utils) #119

Closed Tawagot0 closed 3 years ago

Tawagot0 commented 3 years ago

Hello, my project crash with m3u8-parser (4.5.1) and MR #118 @brandonocasey

Environment: Linux Tested on Windows and working but not on Linux, and working with downgrade to 4.5.0 with Linux.

/root/project/node_modules/@videojs/vhs-utils/es/stream.js:121
export { Stream as default };
^^^^^^

SyntaxError: Unexpected token 'export'
    at wrapSafe (internal/modules/cjs/loader.js:1116:16)
    at Module._compile (internal/modules/cjs/loader.js:1164:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/root/project/node_modules/m3u8-parser/dist/m3u8-parser.cjs.js:9:30)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/root/project/src/m3u8.ts:3:20)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
clementallen commented 3 years ago

I get the same, this can be replicated in Runkit by just importing the module.

4.5.1 broken: https://runkit.com/embed/hj5aa8uahdju

4.5.0 working: https://runkit.com/embed/vja7jq5zw7n3

gkatsev commented 3 years ago

Thanks for opening the issue, we'll take a look.

gkatsev commented 3 years ago

We fixed in in #120. Next patch release should be out soon.

brandonocasey commented 3 years ago

Should be out as a part of 4.5.2

clementallen commented 3 years ago

Thanks for the quick response @gkatsev @brandonocasey - tested the new version and it's working for me 👍

gkatsev commented 3 years ago

Thanks for verifying @clementallen!