Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all dependencies need to be explicit for yarn 2 #7109

Closed
yurique opened this issue Feb 28, 2021 · 3 comments · Fixed by #7263
Closed

all dependencies need to be explicit for yarn 2 #7109

yurique opened this issue Feb 28, 2021 · 3 comments · Fixed by #7263

Comments

@yurique
Copy link

yurique commented Feb 28, 2021

Description

When using yarn 2, the build fails with a number errors like the following:

ERROR in ./.yarn/cache/video.js-npm-7.11.5-3be776ec17-e014baaa89.zip/node_modules/video.js/dist/video.es.js 27:0-37
Module not found: Error: Can't resolve 'm3u8-parser' in '/ ... /.yarn/cache/video.js-npm-7.11.5-3be776ec17-e014baaa89.zip/node_modules/video.js/dist'

I believe the reason for that is that some dependencies are not explicit and come transitively from @videojs/http-streaming.

The workaround is to add those dependencies to the .yarnrc.yml:

yarnPath: ".yarn/releases/yarn-berry.cjs"
packageExtensions:
  "video.js@7.11.5":
    dependencies:
      "mux.js": "*"
      "@videojs/vhs-utils": "2.3.0"
      "m3u8-parser": "4.5.0"
      "mpd-parser": "0.15.0"

What makes it more cumbersome is that we need to pin down those versions (otherwise yarn will resolve vhs-utils v3 which is not compatible with video.js 7.11.5).

The solution for this would be listing these dependencies explicitly in package.json.

Additional Information

versions

videojs

7.11.5

@welcome
Copy link

welcome bot commented Feb 28, 2021

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@gkatsev
Copy link
Member

gkatsev commented Mar 23, 2021

I don't understand why yarn would be resolving vhs-utils to 3.x with that version of Video.js. VHS is setting a 2.x version and m3u8-parser and mpd-parser and aes-decrypter also point at 2.x.

However, yes, we probably need to better support yarn 2.

@gkatsev
Copy link
Member

gkatsev commented Mar 23, 2021

Ok, maybe it isn't yarn 2 that's at fault for vhs-utils 3 based on convo in #6909.

gkatsev added a commit that referenced this issue Jun 7, 2021
gkatsev added a commit that referenced this issue Jun 7, 2021
Because VHS is inlined into Video.js, we should depend on what VHS
depends on.

Fixes #7091, fixes #7209, fixes #7144, fixes #7109
gkatsev added a commit that referenced this issue Jun 8, 2021
Because VHS is inlined into Video.js, we should depend on what VHS
depends on.

Fixes #7091, fixes #7209, fixes #7144, fixes #7109
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
edirub pushed a commit to edirub/video.js that referenced this issue Jun 8, 2023
Because VHS is inlined into Video.js, we should depend on what VHS
depends on.

Fixes videojs#7091, fixes videojs#7209, fixes videojs#7144, fixes videojs#7109
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants