Babylon.gui.d.ts has duplicate identifier, namely TouchHolographicButton

Did a built with the minimal changes I need for Texture classes (repo up to date as of yesterday). When combined with a script that copied d.ts files to a location I have for common d.ts files, I now get errors when transpiling one of my repos, as shown:

../GlobalReferences/bjs/babylon.gui.d.ts(4990,18): error TS2300: Duplicate identifier 'TouchHolographicButton'.
../GlobalReferences/bjs/babylon.gui.d.ts(5444,18): error TS2300: Duplicate identifier 'TouchHolographicButton'.

I remember getting this when I recently (3 weeks ago) was reworking the XR pipeline. Then as now, I just pulled a good if old version the file off a backup, but thought I would report.

is it possible that this is an older version of the declaration? or is this the newest from npm?

** EDIT - i re-read what you wrote, and I think I am reading between the lines that yes, this is the newest, and you use an old one to make sure it works correctly. am I right here?

Exactly, I do a

cd \Babylon.JS
npm run build:babylonjs

in a .bat file, If it worked I do an xcopy in a different .bat.

the gui.d.ts file is not auto-generated when running build:babylonjs, this only builds the UMD. can you run once npm run build:umd and check again?

1 Like