No GLTF file will build in dist package. Download from threejs editor makes no difference

I’ve tried every tip I can find online to get this to work. I’ve tried loading many different models including the examples from mrdoob- GLB and GLTF.

They all display fine with the live server, which means the paths are correct.
When I do npm run build , there’s a load of errors in the ‘dist’ js file including:

new Error(“THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.”

Regular geometry displays fine. I’m using node and vite. Please can you help me! I will be so grateful to solve this problem and get my beautiful models to load.

I actually read the console on the browser and it said the model was not found… so I put the model in the build folder and then it worked! I can’t believe it took me so long to see this

1 Like