Confirming that I’m seeing similar issue when trying to use inspector. Something changed after 5.0.0-rc.4. I believe it’s related to handling around @babylonjs/core/Legacy/legacy, but not yet positive. It appears that local ES6 version of the inspector is not being setup.
Seems not to be working yet. Different error now, related to the inspector.
debugLayer.ts:266 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'IsVisible')
at DebugLayer2.isVisible (debugLayer.ts:266:65)
at DebugLayer2._createInspector (debugLayer.ts:201:18)
Same error if importing sync (way I usually do it) or async (how @rassie did it). Here’s a codesandbox, if it helps: