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

Cannot install from NPM due to conflicting peer dependencies #80

Closed
samanime opened this issue Apr 19, 2022 · 1 comment
Closed

Cannot install from NPM due to conflicting peer dependencies #80

samanime opened this issue Apr 19, 2022 · 1 comment

Comments

@samanime
Copy link

samanime commented Apr 19, 2022

Maybe I'm doing something wrong, but I'm unable to install the three main packages together (core, tools, streaming-image-volume-loader) because there are peer dependency conflicts.

I'm attempting to run (with none of them currently installed or in package.json) using the latest NPM (8.7.0) and Node.js (17.9.0):

npm install --save @cornerstonejs/streaming-image-volume-loader @cornerstonejs/core @cornerstonejs/tools

Results in something like this:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: my-project@0.0.1
npm ERR! Found: @cornerstonejs/core@0.4.6
npm ERR! node_modules/@cornerstonejs/core
npm ERR!   @cornerstonejs/core@"*" from the root project
npm ERR!   peer @cornerstonejs/core@"^0.4.3" from @cornerstonejs/streaming-image-volume-loader@0.2.20
npm ERR!   node_modules/@cornerstonejs/streaming-image-volume-loader
npm ERR!     @cornerstonejs/streaming-image-volume-loader@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @cornerstonejs/tools@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @cornerstonejs/core@0.3.4
npm ERR! node_modules/@cornerstonejs/core
npm ERR!   peer @cornerstonejs/core@"^0.3.0" from @cornerstonejs/tools@0.9.1
npm ERR!   node_modules/@cornerstonejs/tools
npm ERR!     @cornerstonejs/tools@"*" 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.
npm ERR!
npm ERR! See C:\Users\MyUser\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\MyUser\AppData\Local\npm-cache\_logs\2022-04-19T15_15_55_145Z-debug-0.log

I'm not sure why, but tools and streaming both have devDependencies and peerDependencies that are incompatible with each other, and with the other libraries.

I can get core and tools to install, but not streaming-image-volume with them. Or, if I try just streaming-image-volume, I can't get 0.2.19 (latest) to install at all, but I can get 0.2.18, but then I can't get tools to install with it.

Edit: Just to note, if I use --legacy-peer-deps, I am able to install them, though having to use that flag is less than ideal (and if it is required, it should be mentioned in the documentation).

@swederik
Copy link
Member

I think this was fixed by #98 - please reopen if you are still seeing the issue

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