Git Product home page Git Product logo

[Bug] @cornerstonejs/tools/dist/types/utilities/getViewportForAnnotation.d.ts:2:141 - error TS2307: Cannot find module 'packages/core/dist/types/types' or its corresponding type declarations. about cornerstone3d HOT 4 OPEN

robertlario avatar robertlario commented on July 19, 2024
[Bug] @cornerstonejs/tools/dist/types/utilities/getViewportForAnnotation.d.ts:2:141 - error TS2307: Cannot find module 'packages/core/dist/types/types' or its corresponding type declarations.

from cornerstone3d.

Comments (4)

jlopes90 avatar jlopes90 commented on July 19, 2024

I cannot reproduce the error. Try looking if you've already done it https://www.cornerstonejs.org/docs/getting-started/installation.

from cornerstone3d.

robertlario avatar robertlario commented on July 19, 2024

Not sure what to add. I went in directly and changed "packages/core/dist/types/types" to "core/dist/types/types" and it worked fine. I did follow the installation directions as suggested.

This works for me now, so I'll just push forward until I hit this issue again.

from cornerstone3d.

simonbertoli avatar simonbertoli commented on July 19, 2024

Hey all - also getting the same error when updating to the latest tools version

Here is a StackBlitz creating the error
https://stackblitz.com/edit/c3d-tools-type-error?file=index.ts

The issue is in this file
/@cornerstonejs/tools/dist/types/utilities/getViewportForAnnotation.d.ts

Its referring to an internal package (packages/core/dist/types/types) rather than the cornerstonejs package

The fix is to change the import(s) from packages/core/dist/types/types to @cornerstonejs/core/dist/types/types

from cornerstone3d.

frolic06 avatar frolic06 commented on July 19, 2024

I get the same error.
As a temporary fix, I modified the tsconfig.json:
I added this line:
"packages/core/dist/types/types": ["node_modules/@cornerstonejs/core/dist/types/types"] in "compilerOptions" / "paths"

from cornerstone3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.