ChenX
1
There are similar problems in the forum, I have already tried it.
I have loaded it:
import ‘babylonjs-loaders’;
import ‘babylonjs-materials’;
demo repo:
Error message:
BJS - [17:03:23]: Unable to load from https://www.babylonjs.com/Assets/FlightHelmet/glTF/FlightHelmet_Materials.gltf: loadAssets of unknown
Materials:
Name: GlassPlasticMat
Name: LensesMat
Name: LeatherPartsMat
Name: MetalPartsMat
Name: RubberWoodMat
pg:
Well this PG works 
For your page, can you try adding import "@babylonjs/loaders/glTF"
ChenX
3
import { GLTFFileLoader } from “babylonjs-loaders”;
SceneLoader.RegisterPlugin(new GLTFFileLoader());
I ran successfully, although vscode gave an error.
no need to register the plugin, it is already done by the import
ChenX
5
You are right, I should install @babylonjs/loaders
instead of babylonjs-loaders
I have succeeded, thanks