Ok, found the issue. the inspector downloads a CDN version of the GUI for some reason. I’ll check that and make sure that doesn’t happen.
EDIT
Correction - since you can’t define a specific version to download in observable, it downloads the latest stable version, which doesn’t correspond to our preview version. There are two solutions for this -
should download version 21011fc83099a0845a5e6d92fd54c4b43d1c68d4 ( the latest ) of both Babylon.js and the inspector bundle.
This is the version which provokes the error. I can just keep using an earlier commit version like ee7fb62f877de23caf225d4decf103d5c90b9467 which still worked.
no, it was always there
It is just that it is using an internal class that has changed in this version.
You need to make sure all dependencies are from the same version.
you should always be sure to load all needed dependencies from the same babylon version. Every babylon package has a different list of dependencies that should be respected. you can see the lists on npmjs.com or in the package.json file of each package. when installing using npm you will get a warning, but here you are requiring a .js file so it doesn’t work the same.
The best way would be to search here - babylonjs-inspector - npm .
The package.json is generated when needed (i.e. when published). What i meant was to check the package.json of the package that is locally installed, but in your case it’s not 100% a solution
It lists version “5.0.0-alpha.48” for the dependencies. However, this version is a few commits before the current distribution on preview. Could that be reason why the preview Inspector does not seem to use the bundled modules ?
Anyways, I know now a lot more about the babylon modular system than I probably should ;).
that’s the package.json if you use npm, but you don’t
You use our preview cdn
Let’s agree that you need to use the same of everything. if you use the cdn, use everything from the cdn. if you use preview cdn, use everything from the preview cdn. if you use npm, use everything with the same version. And this way everything will work as expected.
I was trying to explain how you find the dependencies needed It doesn’t matter how, as long as you make sure all dependencies are resolved correctly.
Ok, very clear. Just as a note to myself I think that means that the preview cdn may be slightly ahead (?) of a locally build version, and that the preview bundle may not always internally work with itself (?).
Because the preview cdn is more prominently displayed, I was not even aware that alpha versions were on npm. That clears up the confusion. I will then just switch to npm alpha.