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

Issue with Demo Project - Empty Viewport #1

Open
francescoderose opened this issue Nov 6, 2024 · 18 comments
Open

Issue with Demo Project - Empty Viewport #1

francescoderose opened this issue Nov 6, 2024 · 18 comments

Comments

@francescoderose
Copy link

HI,

I’ve tried launching the demo project, but unfortunately, the viewport remains empty every time. I’ve followed the instructions, but the issue persists. Could anyone provide guidance on how to resolve this?

Thank you for your availability and the great work on this project!

image

@EugeneQilo
Copy link

@sedghi any chance you can get this repo to render? I'm getting same results as @francescoderose

@sedghi
Copy link
Member

sedghi commented Nov 11, 2024

Angular uses vite as far as i know, you can take a look at the vite recipe here which seems to work both in prod and dev

https://github.com/cornerstonejs/vue-cornerstone3d

https://github.com/cornerstonejs/vite-react-cornerstone3d

@francescoderose
Copy link
Author

@sedghi Vite shouldn’t be natively compatible with Angular. Is it essential for the functionality, or could we consider another approach? Thank you

@sedghi
Copy link
Member

sedghi commented Nov 12, 2024

I'll check this in about two weeks. I'm currently busy with other tasks, but since Angular uses Vite, it should work the same way.

@EugeneQilo
Copy link

@sedghi Vite or Webpack, it is giving the same issue... The issue is when decodeImageFrameWorker is run as a Worker... The path of import.meta.url is populating as a local file://xxxx path instead of a server path. Not sure if this is something you have faced before and know the answer to.

const instance = new Worker(
new URL('./decodeImageFrameWorker.js', import.meta.url),
{ type: 'module' }
);

@Sinarab
Copy link

Sinarab commented Nov 12, 2024

I'm having tha same issue here. Trying to find a workaround however still stuck, like @sedghi said this seams to be a problem the way vite bundles on a angular app.

Have anyone another solution for this?

@sedghi
Copy link
Member

sedghi commented Nov 12, 2024

try excluding the dicomimageLoader pacakge from vite optimization, as here https://github.com/cornerstonejs/vite-react-cornerstone3d/blob/main/vite.config.ts

@Sulaiman2018
Copy link

Hi, has anyone found a solution to this issue? I'm experiencing the same behavior where the viewport remains empty when trying to launch the demo project. Any ideas or solutions would be really appreciated!

Thanks in advance.

@sgielen
Copy link

sgielen commented Nov 22, 2024

Please try the following things and report back whether any of this seems to help:

@daemon29
Copy link

I have tried the vite config for Angular, but it doesnt make any result

@sedghi
Copy link
Member

sedghi commented Nov 22, 2024

I think the issue is angular does not let you modify the vite config ...
angular/angular-cli#26859

You can give another thumbs down on that comment too ...

So maybe the webpack builder is the way to go

@sedghi
Copy link
Member

sedghi commented Nov 22, 2024

I guess we need to use this one, https://github.com/just-jeb/angular-builders/tree/master/packages/custom-esbuild but right now we don't have priority for it

@sedghi
Copy link
Member

sedghi commented Nov 22, 2024

As i said, we need to open an issue on angular-cli and ask them how to do this, since all the other vite based recipes can already dev/build

@sedghi
Copy link
Member

sedghi commented Nov 22, 2024

Try this

I've read several threads where modifying the Vite config doesn't seem to be possible or on the roadmap for the dev server, so I'm not sure how else I'm supposed to resolve this without disabling the cache entirely through angular.json, which removes a lot of the performance benefits. Appreciate any help!

@sedghi
Copy link
Member

sedghi commented Nov 22, 2024

see this angular/angular-cli#27552 (comment)

@daemon29
Copy link

daemon29 commented Nov 22, 2024

@sedghi This pull request fix the issue. #2
Edit: This pull request only fix the error log in the console, but still cannot display the image
image

@sedghi
Copy link
Member

sedghi commented Nov 28, 2024

I reported the issue to angular team

angular/angular-cli#28994

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

7 participants