Skip to content

Commit

Permalink
docs: update known issues for yarn
Browse files Browse the repository at this point in the history
Updates the known issues documentation to address the problem of Yarn installing multiple versions
of `video.js`, unlike npm. See #222.
  • Loading branch information
jboix authored and amtins committed Mar 15, 2024
1 parent 9070a93 commit 8629f66
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/api/tutorials/Known Issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,31 @@ player.src({ src: 'urn:swi:video:48115940', type: 'srgssr/urn', disableTrackers:
```
Again, in this scenario you MUST NOT re-enable the tracking for `trackedPlayer`.

### Yarn Deduplication Issue

This section highlights a known issue with Yarn leading to multiple versions of `video.js` being
installed in a project, contrary to npm's deduplication to a single version.
#### Issue Details
- **Scenario**: Cyclic dependencies involving `video.js` result in conflicting versions being
installed via Yarn.
- **Symptoms**: This causes compatibility issues, such as the `eme` plugin loading in only
one `video.js` instance, leading to errors.
#### Workaround
To mitigate this issue, force Yarn to resolve `video.js` to a single version (`8.11.8`) by adding
the following to your project's `package.json`:

```json
"resolutions": {
"video.js": "8.11.8"
}
```

See [Yarn's Manifest Resolutions][yarn-resolutions].
[yarn-resolutions]: https://yarnpkg.com/configuration/manifest#resolutions
[ios-bug]: https://bugs.webkit.org/show_bug.cgi?id=261512

0 comments on commit 8629f66

Please sign in to comment.