# Broken Inspector dependencies

**URL:** <https://forum.babylonjs.com/t/broken-inspector-dependencies/63476>\
**Category:** Bugs\
**Created:** [May 18, 2026, 2:36am UTC](https://forum.babylonjs.com/t/broken-inspector-dependencies/63476 "2026-05-18T02:36:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![splash27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@splash27](https://forum.babylonjs.com/u/splash27)\
**Post date:** [May 18, 2026, 2:36am UTC](https://forum.babylonjs.com/t/broken-inspector-dependencies/63476/1 "2026-05-18T02:36:01Z")

</div>

As soon as I do

```auto
import * as BABYLON from "babylonjs";
import "babylonjs-loaders";
import { ShowInspector } from "@babylonjs/inspector";

```

I get build error:

```auto
WARNING in ./node_modules/@babylonjs/gui-editor/dist/babylon.guiEditor.js 1:1407132-1407189
Module not found: Error: Can't resolve '@fortawesome/fontawesome-svg-core/package.json' in 'C:\babylon\node_modules\@babylonjs\gui-editor\dist'
 @ ./node_modules/@babylonjs/inspector/lib/index-PYblOaAV.js 21760:54-85 21050:46-77
 @ ./node_modules/@babylonjs/inspector/lib/index.js 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453 1:0-3453
...

```

It worked fine till 9.0.0 inclusive. Later it stopped, even if I revert it back to 9.0.0. Probably one of downstream dependencies got broken sometime after the release of 9.0.0. So, no matter which version I am going to use, `npm install` pulls a broken dependency, because it was defined as “^x.x.x” and consumed something bad on full re-install (that’s my hypothesis, though).

I created a minimal CodeSandbox example: [https://codesandbox.io/p/sandbox/8jrqs4](https://codesandbox.io/p/sandbox/8jrqs4). Unfortunately, CodeSandbox doesn’t print build errors, but if you will comment out the Inspector import, then everything starts to work instantly. This sandbox is just to demonstrate that the issue is there.

**Appendix:**  
Just to save everybody’s time and not to flood with unrelated conversations.

1. There are reasons why I prefer classic `babylonjs-*` imports instead of new `@babylon/*` for most of the BabylonJS things. What important is that it worked well before, even if I used `@babylonjs/inspector` for inspector only.
2. I tried to do `import "babylonjs-inspector"` instead as the docs suggest, but it led to another dependency related build errors.

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 18, 2026, 2:20pm UTC](https://forum.babylonjs.com/t/broken-inspector-dependencies/63476/2 "2026-05-18T14:20:28Z")

</div>

cc @ryantrem @RaananW

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [May 18, 2026, 3:49pm UTC](https://forum.babylonjs.com/t/broken-inspector-dependencies/63476/3 "2026-05-18T15:49:58Z")

</div>

Well, the simplest fix is to actually install this dependency

`npm i @fortawesome/fontawesome-svg-core@6.7.2`

I’ll check what has changed. probably a dev vs regular dependency issue

---

<div class="post-metadata">

**Author:** ![SondreElgBB](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sondreelgbb/32/45949_2.png) [@SondreElgBB](https://forum.babylonjs.com/u/SondreElgBB)\
**Post date:** [July 7, 2026, 9:39am UTC](https://forum.babylonjs.com/t/broken-inspector-dependencies/63476/4 "2026-07-07T09:39:44Z")

</div>

Any updates on this issue?

The inspector still seems to break builds on initialization in version 9.13.0, due to a lot of missing dependencies.

For reference, my output looks like this:

```auto
Error: Build failed with 38 errors:
../../node_modules/@babylonjs/inspector/lib/extensionsListService-CRrXaW45.js:2:380: ERROR: Could not resolve "@fluentui/react-components"
../../node_modules/@babylonjs/inspector/lib/extensionsListService-CRrXaW45.js:5:167: ERROR: Could not resolve "@fluentui/react-icons"
../../node_modules/@babylonjs/inspector/lib/extensionsListService-CRrXaW45.js:6:21: ERROR: Could not resolve "@fluentui/react-motion-components-preview"
../../node_modules/@babylonjs/inspector/lib/extensionsListService-CRrXaW45.js:15:7: ERROR: Could not resolve "@fluentui-contrib/react-resize-handle"
../../node_modules/@babylonjs/inspector/lib/extensionsListService-CRrXaW45.js:16:7: ERROR: Could not resolve "@fluentui-contrib/react-virtualizer"

```

Including some dependencies I know for a fact I’ve already imported:

```auto
X [ERROR] Could not resolve "@babylonjs/serializers/glTF/2.0/glTFSerializer.js"

    ../../node_modules/@babylonjs/inspector/lib/index-FmyqCUQR.js:23758:41:
      23758 │ const { GLTF2Export } = await import('@babylonjs/serializers/glTF/2.0/glTFSerializer.js');

```

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 7, 2026, 9:41am UTC](https://forum.babylonjs.com/t/broken-inspector-dependencies/63476/5 "2026-07-07T09:41:52Z")

</div>

Sorry for not updating, i actually pushed a change that was supposed to fix this. but let me check again. I will reference a PR here if I find something that needs to be fixed.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 7, 2026, 9:56am UTC](https://forum.babylonjs.com/t/broken-inspector-dependencies/63476/6 "2026-07-07T09:56:44Z")

</div>

> <https://github.com/BabylonJS/Babylon.js/pull/18663>
>
> \## Problem
> 
> Reported on the forum: \[Broken inspector dependencies\](https://forum….babylonjs.com/t/broken-inspector-dependencies/63476). Consumers of the published \`@babylonjs/inspector\` (v2) hit build errors like:
> 
> \`\`\`
> ERROR: Could not resolve "@fluentui/react-motion-components-preview"
> \`\`\`
> 
> even after installing every peer dependency the package declares.
> 
> \## Root cause
> 
> The inspector-v2 rollup config externalizes \*\*all\*\* \`@fluentui/\*\` and \`@fluentui-contrib/\*\` imports:
> 
> \`\`\`js
> if (/^@fluentui(-contrib)?\\//.test(id)) return true;
> \`\`\`
> 
> so every one of them stays as a bare import in the shipped bundle and must be declared as a peer dependency. Two externalized packages are imported by the bundle (via \`shared-ui-components\`' \`extensionsListService.tsx\`, \`shellService.tsx\`, and \`collapse.tsx\` — the \`extensionsListService-\*.js\` file in the forum error) but were \*\*not\*\* declared:
> 
> \- \`@fluentui/react-motion-components-preview\`
> \- \`@fluentui/react-utilities\`
> 
> They only resolve inside our monorepo because they're transitive deps of \`@fluentui/react-accordion\` (part of \`@fluentui/react-components\`). That makes them phantom dependencies — strict resolvers (esbuild, pnpm, yarn) fail to resolve them for consumers.
> 
> \## Fix
> 
> Declare both packages as peer dependencies in:
> \- \`packages/public/@babylonjs/inspector-v2/package.json\`
> \- \`packages/dev/sharedUiComponents/package.json\` (where the imports originate)
> 
> Versions match the current lockfile (\`^0.15.2\` / \`^9.26.2\`).
> 
> \## Notes
> 
> \- No source/behavior changes — packaging metadata only.
> \- The separate \`@fortawesome/\*\` resolution error in the same thread comes from bundled \`@babylonjs/gui-editor\` and is an "install the peer" situation, not addressed here.
