player.js icon indicating copy to clipboard operation
player.js copied to clipboard

error - ReferenceError: EventTarget is not defined

Open Jairwin-L opened this issue 2 years ago • 4 comments

install using pnpm, then pnpm dev image env info

"@vimeo/player": "^2.20.1",
"react": "18.2.0",
"react-dom": "18.2.0",

guess there might be something wrong here: https://github.com/vimeo/player.js/blob/master/src/lib/functions.js#L117

Jairwin-L avatar Jun 02 '23 04:06 Jairwin-L

@Jairwin-L I was unable to reproduce this issue.

See the following Stackblitz which has React and @vimeo/player and all seems to work well. https://stackblitz.com/edit/stackblitz-starters-nmzj5j?file=src%2FApp.tsx

If you can help us reproduce this issue or if you can provide more details about your setup and code we'd be happy to investigate further.

salmoro avatar Jun 02 '23 14:06 salmoro

let me think about it

Jairwin-L avatar Jun 05 '23 02:06 Jairwin-L

@salmoro I re-reproduced this problem. It seems to be because of the node version. There are two node versions on my computer: 14.19.3 and 18.0.0. The 14 version will have this error, and the 18 version will not

Jairwin-L avatar Jun 08 '23 02:06 Jairwin-L

If I rollback vimeo/player version 2.18.0 it works with server side with node 14.18

rs-r2d2 avatar Nov 03 '23 12:11 rs-r2d2

Not sure what happened in 2.19 to break it, but I'm going to close this one out because Node 20 is now the LTS version.

bdougherty avatar Apr 03 '24 17:04 bdougherty