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

npm install twice error #463

Open
4 tasks done
wxfred opened this issue Apr 12, 2024 · 1 comment
Open
4 tasks done

npm install twice error #463

wxfred opened this issue Apr 12, 2024 · 1 comment

Comments

@wxfred
Copy link

wxfred commented Apr 12, 2024

Describe the bug

Run npm install video.js @videojs-player/vue --save
Then run npm install, the error comes out

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @videojs-player/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/video.js
npm ERR!   video.js@"^8.10.0" from the root project
npm ERR!   video.js@"^7 || ^8" from @videojs/[email protected]
npm ERR!   node_modules/@videojs/http-streaming
npm ERR!     @videojs/http-streaming@"3.10.0" from [email protected]
npm ERR!   1 more (videojs-contrib-quality-levels)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer video.js@"7.x" from @videojs-player/[email protected]
npm ERR! node_modules/@videojs-player/vue
npm ERR!   @videojs-player/vue@"^1.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/video.js
npm ERR!   peer video.js@"7.x" from @videojs-player/[email protected]
npm ERR!   node_modules/@videojs-player/vue
npm ERR!     @videojs-player/vue@"^1.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Reproduction

Run npm install video.js @videojs-player/vue --save
Then run npm install, the error comes out

System Info

System:
  OS: Windows 10 10.0.19045
  CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
  Memory: 14.61 GB / 31.84 GB
Binaries:
  Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
  npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
  Chrome: 123.0.6312.122
npmPackages:
  @videojs-player/vue: ^1.0.0 => 1.0.0
  video.js: ^8.10.0 => 8.10.0

Used Package Manager

npm

Validations

  • Read the the documentation in detail.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.
@mlanning
Copy link

Although not the exact same issue, I ran into something that may help. When using npm workspaces and running npm install video.js @videojs-player/vue --save --workspace=my-workspace, it created an extra node_modules directory in my workspace. This is usually a sign of mismatched dependencies, so I investigated. After scanning though the package-lock.json file, it looks like @videojs-player/vue depends on video.js version ^6 || ^7. When I rolled back video.js to version ^7.0.0, everything worked as expected. Perhaps if you remove the current version ^8.10.0, and install "video.js": "^7.0.0" instead, it may solve your issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants