# Can't load Gaussian Splat into React project

**URL:** <https://forum.babylonjs.com/t/cant-load-gaussian-splat-into-react-project/56844>\
**Category:** Bugs\
**Tags:** react, loaders, gaussian-splatting\
**Created:** [February 28, 2025, 7:54pm UTC](https://forum.babylonjs.com/t/cant-load-gaussian-splat-into-react-project/56844 "2025-02-28T19:54:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnsosebee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnsosebee/32/45403_2.png) [@dnsosebee](https://forum.babylonjs.com/u/dnsosebee)\
**Post date:** [February 28, 2025, 7:54pm UTC](https://forum.babylonjs.com/t/cant-load-gaussian-splat-into-react-project/56844/1 "2025-02-28T19:54:43Z")

</div>

Hello, I am a first time user and running into an issue while trying to load a Gaussian splat into my scene in a React project.

To reproduce (also I provide a StackBlitz)

1. I just cloned the latest Vite + React + Typescript starter repo
2. added the boilerplate / starter-code from this guide: [Babylon.js docs](https://doc.babylonjs.com/communityExtensions/Babylon.js+ExternalLibraries/BabylonJS_and_ReactJS)
3. added the mesh loader line from this example: [https://playground.babylonjs.com/#M05L0C#1](https://playground.babylonjs.com/#M05L0C#1)
4. The mesh is not visible in the scene, and I get the following console error:  
 ![CleanShot 2025-02-28 at 11.52.52@2x](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/3/1/313b37176543c77e3aac8b23c4684a608f1a171b.png)

Full repro here: [Vitejs - Vite (forked) - StackBlitz](https://stackblitz.com/edit/vitejs-vite-ajbvayf4?file=src%2FApp.tsx)

Has anyone got gaussian splatting working with React, or know what may be causing this error? Thank you

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [March 3, 2025, 5:10pm UTC](https://forum.babylonjs.com/t/cant-load-gaussian-splat-into-react-project/56844/2 "2025-03-03T17:10:55Z")

</div>

cc @Cedric

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [March 3, 2025, 5:59pm UTC](https://forum.babylonjs.com/t/cant-load-gaussian-splat-into-react-project/56844/3 "2025-03-03T17:59:32Z")

</div>

Babylon.js loaders are needed to load splats and it’s missing from package.json.

---

<div class="post-metadata">

**Author:** ![dnsosebee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnsosebee/32/45403_2.png) [@dnsosebee](https://forum.babylonjs.com/u/dnsosebee)\
**Post date:** [March 3, 2025, 7:23pm UTC](https://forum.babylonjs.com/t/cant-load-gaussian-splat-into-react-project/56844/4 "2025-03-03T19:23:53Z")

</div>

Thanks, I tried adding the loaders in the Stackblitz, however I get the same error.

I still get `RuntimeError: Unable to load from https://raw.githubusercontent.com/CedricGuillemet/dump/master/racoonfamily.spz: importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse`

(package.json: [Vitejs - Vite (forked) - StackBlitz](https://stackblitz.com/edit/vitejs-vite-ajbvayf4?file=package.json))

---

<div class="post-metadata">

**Author:** ![SimoneDev](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/simonedev/32/44252_2.png) [@SimoneDev](https://forum.babylonjs.com/u/SimoneDev)\
**Post date:** [March 3, 2025, 8:19pm UTC](https://forum.babylonjs.com/t/cant-load-gaussian-splat-into-react-project/56844/5 "2025-03-03T20:19:17Z")

</div>

You should register the builtin loaders before load the model (preferably in `App.tsx`):

```auto
import { registerBuiltInLoaders } from "@babylonjs/loaders/dynamic";
...
registerBuiltInLoaders();

```

“This will register all supported loaders, but internally uses dynamic imports to only download/load a specific importer (e.g. glTF, splat, etc.) when a model of that type is first loaded.” Taken from here:

> **[Babylon.js docs](https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes)**

* * *

As side note, keep update to the same version both `@babylonjs/core` and `@babylonjs/loaders` otherwise you will get compilation errors if you install for the first time the dependencies declared in the existing `package-lock.json`.

---

<div class="post-metadata">

**Author:** ![dnsosebee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnsosebee/32/45403_2.png) [@dnsosebee](https://forum.babylonjs.com/u/dnsosebee)\
**Post date:** [March 3, 2025, 8:47pm UTC](https://forum.babylonjs.com/t/cant-load-gaussian-splat-into-react-project/56844/6 "2025-03-03T20:47:27Z")

</div>

> import { registerBuiltInLoaders } from “@babylonjs/loaders/dynamic”;  
> …  
> registerBuiltInLoaders();

That fixed it for me, thank you! And good to know about the package versions.
