Unable to setup local development environment (dev/inspector)

Scenario:

I am trying to setup my local Babylon.js dev environment to test upgrades I am making to the Inspector with my existing app. I have tried multiple mixes of imports to get the local dev environment working and well, I’m not entirely sure what the correct way is.

I have also used link as per the instructions, trying to link @dev/inspector to no avail.

Error, and I get many different variants of this if I try to link locally other Babylon packages as well:

[plugin:vite:import-analysis] Failed to resolve import "core/Misc/observable" from "../Babylon.js/packages/dev/inspector/dist/inspector.js". Does the file exist?
../src/inspector.ts:7:27
1  |  import * as React from "react";
2  |  import * as ReactDOM from "react-dom";
3  |  import { Observable } from "core/Misc/observable";
   |                              ^
4  |  import { EngineStore } from "core/Engines/engineStore";
5  |  import { SceneLoader } from "core/Loading/sceneLoader";

Imports in the app’s package.json:

"@babylonjs/core": "^7.21.4",
"@babylonjs/inspector": "file:///[local path in system]/Babylon.js/packages/dev/inspector",
"@babylonjs/loaders": "^7.21.4",

cc @RaananW

You would normally need to use npm link for this. this is detailed here : Babylon.js docs

I tried many variations of that, I suppose my question would be is that section all I need to do or is there something special I was missing here?

You should only need this:

2 Likes