React-diagrams: TS2307: Cannot find module '../../react-canvas-core/dist/@types'.

Created on 4 Sep 2019  路  6Comments  路  Source: projectstorm/react-diagrams

Hi,

I am using the latest beta ("@projectstorm/react-diagrams": "^6.0.1-beta.4").

Im getting this error, but the application seems to be working fine.

ERROR in /Users/admin/node_modules/@projectstorm/react-diagrams-core/dist/@types/src/DiagramEngine.d.ts(24,147): TS2307: Cannot find module '../../react-canvas-core/dist/@types'. ERROR in /Users/admin/node_modules/@projectstorm/react-diagrams-core/dist/@types/src/DiagramEngine.d.ts(25,147): TS2307: Cannot find module '../../react-canvas-core/dist/@types'. ERROR in /Users/admin/node_modules/@projectstorm/react-diagrams-core/dist/@types/src/DiagramEngine.d.ts(26,152): TS2307: Cannot find module '../../react-canvas-core/dist/@types'. ERROR in /Users/admin/node_modules/@projectstorm/react-diagrams-core/dist/@types/src/DiagramEngine.d.ts(27,147): TS2307: Cannot find module '../../react-canvas-core/dist/@types'. ERROR in /Users/admin/node_modules/@projectstorm/react-diagrams-core/dist/@types/src/entities/link-layer/LinkLayerModel.d.ts(14,59): TS2307: Cannot find module '../../../../react-canvas-core/dist/@types'. ERROR in /Users/admin/node_modules/@projectstorm/react-diagrams-core/dist/@types/src/entities/link/PointModel.d.ts(3,44): TS2304: Cannot find name 'Omit'. ERROR in /Users/admin/node_modules/@projectstorm/react-diagrams-core/dist/@types/src/entities/node-layer/NodeLayerModel.d.ts(11,59): TS2307: Cannot find module '../../../../react-canvas-core/dist/@types'.

Most helpful comment

I have the same problem.

All 6 comments

I have the same problem

@DeepakNatraj how you solved this problem?

I fixed
"Cannot find name 'Omit'."
by updating the TypeScript in project to > 3.5.2

ERROR in [switch-components] ..\node_modules\@projectstorm\react-diagrams-core\dist\@types\src\DiagramEngine.d.ts:24:147
    TS2307: Cannot find module '../../react-canvas-core/dist/@types'.

ERROR in [switch-components] ..\node_modules\@projectstorm\react-diagrams-core\dist\@types\src\DiagramEngine.d.ts:25:147
    TS2307: Cannot find module '../../react-canvas-core/dist/@types'.

ERROR in [switch-components] ..\node_modules\@projectstorm\react-diagrams-core\dist\@types\src\DiagramEngine.d.ts:26:152
    TS2307: Cannot find module '../../react-canvas-core/dist/@types'.

ERROR in [switch-components] ..\node_modules\@projectstorm\react-diagrams-core\dist\@types\src\DiagramEngine.d.ts:27:147
    TS2307: Cannot find module '../../react-canvas-core/dist/@types'.

ERROR in [switch-components] ..\node_modules\@projectstorm\react-diagrams-core\dist\@types\src\entities\node-layer\NodeLayerModel.d.ts:11:59
    TS2307: Cannot find module '../../../../react-canvas-core/dist/@types'.

ERROR in [switch-components] ..\node_modules\@projectstorm\react-diagrams-core\dist\@types\src\entities\link-layer\LinkLayerModel.d.ts:14:59
    TS2307: Cannot find module '../../../../react-canvas-core/dist/@types'.

the ways are not right

test1

@mathiasbaldissera @dylanvorster
I added your library to my project I'm working on, but the webpack does not want to build it.

I tried adding your library to an empty project and it works.

maybe it is necessary to configure somehow tskonfig for your library?

what could be the problem?

Looks like the path is somehow too short... ../../../../react-canvas-core/dist seems to be the right pointer: is it possible?

I have the same problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

t-gacema picture t-gacema  路  4Comments

gugaevkirill picture gugaevkirill  路  3Comments

duvet86 picture duvet86  路  3Comments

iddan picture iddan  路  3Comments

shortwavedave picture shortwavedave  路  3Comments