Skip to content

fix: resolve missing hlsjs-video peer dependency from #2604 #2622

Description

@github-actions

Summary

Classification: real regression. The registry-generated Next.js React consumer cannot build because @videojs/react/media/hlsjs-video imports @videojs/hlsjs-video, but that module is absent from the consumer installation.

Triggering PR

feat(react): add createMediaComponent

Failed run

  • Run: https://github.com/videojs/v10/actions/runs/33800350684
  • Head SHA: 82c5e3d496cd420205ba3397754588c1c006baca
  • Affected test: Registry consumers / generated next-react-tailwind consumer. Playwright tests did not start because global setup failed while building the consumer.

Evidence

  • The failed job log reports Module not found: Can't resolve '@videojs/hlsjs-video' from @videojs/react/dist/default/media/hlsjs-video/adapter.js during next build.
  • The sole uploaded artifact, playwright-report-registry, has no failed test or trace: setup stopped before the test phase.
  • At the head SHA, packages/react/package.json declares @videojs/hlsjs-video as an optional peer dependency, while the React hlsjs-video entry statically imports HlsJsAdapter from it. The registry package-closure logic follows dependencies and optionalDependencies, not peer dependencies, so it does not pack or override that engine package for the consumer.
  • The PR diff refactors HlsJsVideo to createMediaComponent and retains its static @videojs/hlsjs-video import; the consumer fixture imports HlsJsVideo without installing that peer.

Likely cause

Verified facts: the generated consumer installs a packed @videojs/react but has no resolvable @videojs/hlsjs-video; its build fails on the static import.

Inference: the React media entry has a required runtime peer that the registry-consumer setup does not install. This breaks a supported registry consumer path and is not a flaky browser-test failure.

Recommended actions

  1. Decide the supported installation contract for @videojs/react/media/hlsjs-video.
  2. If the engine is required, include it in the installed registry closure or make it a non-optional runtime dependency.
  3. If it is intentionally peer-installed, add it explicitly to the generated Next.js consumer and add coverage for the documented peer-install path.
  4. Re-run the registry-consumer validation after the dependency graph is corrected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions