vidstack / player

UI components and hooks for building video/audio players on the web. Robust, customizable, and accessible. Modern alternative to JW Player and Video.js.
https://vidstack.io
MIT License
2.15k stars 126 forks source link

Error causing builds to fail in Cloudflare Pages local preview #1329

Closed ramiroazar closed 1 month ago

ramiroazar commented 3 months ago

Current Behavior:

Vidstack React causing wrangler pages dev to fail in Cloudflare Pages project using Remix template.

Expected Behavior:

Running wrangler pages dev should start a local server successfully.

Steps To Reproduce:

  1. Set up a new project
  2. Install Vidstack React
  3. Run preview (ie. npm run preview or npm run build && wrangler pages dev)

Environment:

Anything Else?

This seems related to https://github.com/vidstack/player/pull/1198 as the errors look virtually identical, though in this case it's related to @vidstack/react instead of vidstack.

Screenshot 2024-07-01 at 3 57 39 PM

This is working when running the Remix local server instead using npm run dev or remix vite:dev.

It's also working when the project is built in Cloudflare Pages using npm run build or remix vite:build.

The vidstack package using Web Components also works as expected.