BALKANGraph / FamilyTreeJS

Build family tree app with BALKAN FamilyTreeJS library. Family Tree also called a genealogy or a pedigree chart, is a chart representing family relationships in a conventional tree structure.
60 stars 17 forks source link

'FamilyTree' has no exported member 'move' #69

Closed matthewbrown62 closed 1 year ago

matthewbrown62 commented 1 year ago

After updating my angular project to version 13 I began encountering this error when trying to compile:

Error: node_modules/@balkangraph/familytree.js/familytree.d.ts:369:40 - error TS2694: Namespace 'FamilyTree' has no exported member 'move'.

So I downgraded it back to 12 and still, for whatever reason, continued to have this error.

So I added interface move { } to familytree.d.ts in declare namespace FamilyTree and it seems to have resolved the issue. I don't know if there are any side effects for doing this, but the chart seems to be functioning as normal.

ZornitsaPesheva commented 1 year ago

It looks like this "move" is not something in the Family Tree JS, but something that you have developed.

matthewbrown62 commented 1 year ago

The only thing that I edited was adding what I mentioned above. Every time I delete the package and reinstall with npm i @balkangraph/familytree.js it throws the error I mentioned above when I ng build.

ZornitsaPesheva commented 1 year ago

If you have edited the source code, it is normal as it downloads it on build from NPM. You shouldn't edit the source code. It is better to add what you need in another js.

matthewbrown62 commented 1 year ago

I didn't edit the source code except to fix the error that it has when it compiles.

Here is a screenshot of your source code on Github with the line that I'm talking about:

image

The FamilyTree.move is what is throwing the error because move does not exist on the FamilyTree namespace.

ZornitsaPesheva commented 1 year ago

We have fixed that. Please get the latest version.

matthewbrown62 commented 1 year ago

It looks like its compiling with the newest version. Thank you.