Error when selecting something in inspector

I am getting this error when selecting something in the inspector in move mode.

Uncaught TypeError: Cannot read properties of null (reading ‘getEngine’)

it does not matter what type of element I select in in the inspector.

Also weird thing is I wasnt getting this error before but getting this now. Wondering if its an API version issue?

“dependencies”: {
@babylonjs/core”: “^4.2.0”,
@babylonjs/inspector”: “^4.2.0”,
@babylonjs/loaders”: “^4.2.0”,
“axios”: “^0.21.4”,
“babylonjs”: “^4.2.0”,
“babylonjs-materials”: “^4.2.0”,
“babylonjs-serializers”: “^4.2.0”,

You can’t mix the different types of packages. I think the “@” packages are for ES6. So, you should remove “babylonjs” and all the “babylonjs-xxx” packages and add the corresponding ES6 packages ("@babylonjs/materials" and “@babylonjs/serializers” - Babylon.js ES6 support with Tree Shaking | Babylon.js Documentation).

1 Like

this is really weird you get this in 4.2 :frowning: maybe @RaananW would have an idea?

As @Evgeni_Popov said, it seems like you are including babylon twice - as es66 dependency and as UMD (@babylonjs/core and babylonjs).
You might be using the UMD version to render your scene, but the es6 to display the inspecor. How exactly - it’s hard to say, but try being consistent with your includes. materials and serializers should also come from the @babylonjs namespace instead of the UMD versions.