-
Notifications
You must be signed in to change notification settings - Fork 285
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
Uncaught TypeError: Cannot read properties of undefined (reading 'vec2') at CrosshairsTool.ts:54:34 #339
Comments
I'm experiencing the same issue when using it in a Next.js project. As far as I was able to investigate, this problem was introduced on commit 18aa4d8 that includes versions:
The last working version on my case is @cornerstonejs/tools@0.27.2 combined with @cornerstonejs/core@0.19.2 and @cornerstonejs/streaming-image-volume-loader@0.5.19. Not sure if @sedghi can provide any feedback since it was the main contributor of this version. Using the latest versions, this error a bit different but related to loading modules:
Let me now if you need anything. Thanks! |
Hmm, the latest version error seems weird to me. I checked floodfill export and it looked fine to me here It would help if you provide a repo link for sure |
Thanks @sedghi for your fast reply! It turn out that the problem only occurs on dev mode running the app using I prepared a basic repo to show them problem: https://github.com/rogerbramon/cornerstone-nextjs On main branch, you have a working setup using versions: @cornerstonejs/tools@0.27.2 combined with @cornerstonejs/core@0.19.2 and @cornerstonejs/streaming-image-volume-loader@0.5.19. On branch cornerstone-issue-339, I just updated to the latest available versions. The error should appear just after starting the website using Hope that helps. |
I think I have a fix. Maybe try it after merged |
Thanks @sedghi! It seems to be fixed on @cornerstonejs/tools@0.35.2. Is there anything we can do to prevent it from happening again in the future? |
I'm not sure what was the issue. probably from next.js ts loader ...? |
Not sure either... It seems to be happening on Vue3 too. |
so there is still problem? what it says in Vue? |
No, sorry for the confusion. I meant that when the issue was reported by @mxj009 it was happening on Vue3. So, the cause was probably affecting both frameworks (Next.js, Vue3). It's working for me now on Next.js. |
related #226 |
This seem to be related to the ciruclar dependencies that we have #742 |
import * as cornerstoneTools from '@cornerstonejs/tools';
In Vue3, after all dependencies are installed and Cornerstone is introduced, the error of vec2 is reported
The text was updated successfully, but these errors were encountered: