Skip to content

[Bug] Unable to use this as an NPM #5712

@edwinxavier93

Description

@edwinxavier93

Describe the Bug

I'm trying to install npm i @ohif/viewer, in my vite + react (18+) application with TS,
install fails with

npm error Could not resolve dependency:
npm error peer react@"^16.8.6" from @ohif/[email protected]
npm error node_modules/@ohif/viewer
npm error @ohif/viewer@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

yet, installed using --legacy-peer-deps, but the imports are not working inside the app.

Steps to Reproduce

none

The current behavior

npm fails without --legacy-peer-deps
imports are not working

The expected behavior

npm should work without --legacy-peer-deps
imports of @ohif/viewer should work

System Information

OS: MAC

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions