Unable to load mesh

I just started using Babyon js and i didnt have this problem in html but in react I have the problem which I dont understand why. I have similar file structure in html and I am sure I write right path to the model but I get this:
Unable to load from /scenes/whiteShirt.glb: importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse
I thing it is because of wrong path but trying differente things none of them worked.
The code for react I used from here
The file this code is located is App.js

Thanks for your help.


That means you don’t have the glTF/glb loader loaded in your babylon context.
You will need to install @babylonjs/loaders, and import the glTF2 loader before loading the model

are there any docs about how to use it?

Otherwise there are many examples (one of them is - babylonjs-webpack-es6/loadModelAndEnv.ts at master · RaananW/babylonjs-webpack-es6 · GitHub


I solved it. Thanks you.