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

[Bug] Integrating react app with ohif viewer using #4546

Open
itsmatheusmoura opened this issue Nov 24, 2024 · 0 comments
Open

[Bug] Integrating react app with ohif viewer using #4546

itsmatheusmoura opened this issue Nov 24, 2024 · 0 comments
Labels
Awaiting Reproduction Can we reproduce the reported bug?

Comments

@itsmatheusmoura
Copy link

Describe the Bug

Hello everyone.
I'm trying to integrate my React project with TypeScript using the OHIF viewer with @ohif/viewer, but I'm encountering the following error:
Failed to resolve entry for package "@ohif/viewer". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-scan]
`import React from 'react';
import { OHIFViewer } from '@ohif/viewer';
import DICOMwebClient from "dicomweb-client/types/api";

const ViewerDicom: React.FC = () => {
const studyInstanceUID = "1.2.840.113619.2.55.3.604688351.100.100";
const seriesInstanceUID = "1.2.840.113619.2.55.3.604688351.100.101";
const sopInstanceUID = "1.2.840.113619.2.55.3.604688351.100.102";

const dicomWebClient = new DICOMwebClient(
    {
        url: "",
        singlepart: true
    }
);

const data = {
    studies: [
        {
            studyInstanceUID,
            series: [
                {
                    seriesInstanceUID,
                    instances: [
                        {
                            sopInstanceUID,
                           
                        },
                    ],
                },
            ],
        },
    ],
};

return (
    <div style={{ height: '100vh' }}>
        <OHIFViewer
            data={data}
            dicomWebClient={dicomWebClient}
        />
    </div>
);

};

export default ViewerDicom;`

Has anyone encountered this issue before?
"react": "^18.3.1",
"@ohif/viewer": "^4.12.51",
node: 20.9.0

Steps to Reproduce

Installation "@ohif/viewer"

The current behavior

never work

The expected behavior

Running project

OS

ubuntu 22.04

Node version

20.9.0

Browser

brave or chrome

@itsmatheusmoura itsmatheusmoura added the Awaiting Reproduction Can we reproduce the reported bug? label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Reproduction Can we reproduce the reported bug?
Projects
None yet
Development

No branches or pull requests

1 participant