vimeo / player.js

Interact with and control an embedded Vimeo Player.

Home Page:https://player.vimeo.com/api/demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error - ReferenceError: EventTarget is not defined

Jairwin-L opened this issue · 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 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.

let me think about it

@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

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

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.