@babylonjs\inspector to my project via
npm install @babylonjs\inspector it imports everything correctly. However, when I go to import via
import "@babylonjs/inspector" at the top of my
.ts file…i get an error:
Error: node_modules/@babylonjs/inspector/dist/babylon.inspector.module.d.ts:4970:170 - error TS2307: Cannot find module './types' or its corresponding type declarations.
4970 export const getPosInLayout: (layout: Layout, column: number, row?: number | undefined) => import("@babylonjs/inspector/components/layout/types").LayoutTabsRow | import("./types").LayoutColumn;
I can simply fix this by changing:
But obviously its not good to modifiy stuff in
/node_modules as it will be overwritten via any
npm install etc
that should work, i’ll have to see what happened. Just making sure, are you using the latest version of the inspector?
Yeah I believe I am using the latest…
@babylonjs/inspector": "^5.31.2. Just upgraded everything a few days ago
Awesome…I’ll be sure to update my version as soon as it goes out. Thanks for the fix
Hello again @RaananW . So I updated everything to:
And it seems to have resolved the original error, but now there is another error present in that file. Its basically a bunch of:
node_modules/@babylonjs/inspector/dist/babylon.inspector.module.d.ts:7012:33 - error TS2304: Cannot find name 'StoryObj'.
on a bunch of lines. I don’t know why your change would affect that haha, but it seems that class
StoryObj is not being imported in now.
looks like we might be leaking stories in the actual package ??? not sure they should be released @RaananW
Addressing export issue by RaananW · Pull Request #13270 · BabylonJS/Babylon.js (github.com)
This will be fixed by this PR. I will rebuild right after this is merged.
Just wanted to note - there is no need to add both babylonjs and @babylonjs/core . one is enough (core in your case, since you are using es6).
Everything seems to be working. Thanks man!