# Playground Template not loading model in html

**URL:** <https://forum.babylonjs.com/t/playground-template-not-loading-model-in-html/40718>\
**Category:** Questions\
**Created:** [May 11, 2023, 10:36pm UTC](https://forum.babylonjs.com/t/playground-template-not-loading-model-in-html/40718 "2023-05-11T22:36:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amirhameed\_Amirjalal](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/amirhameed_amirjalal/32/32012_2.png) [@Amirhameed\_Amirjalal](https://forum.babylonjs.com/u/Amirhameed_Amirjalal)\
**Post date:** [May 11, 2023, 10:36pm UTC](https://forum.babylonjs.com/t/playground-template-not-loading-model-in-html/40718/1 "2023-05-11T22:36:20Z")

</div>

[glTF Loader Demo | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#YAL1RN)  
The skull works and uploads in the playground just fine, but when I download the playground file and try to run it I keep getting this error:  
ncaught Error RuntimeError: Unable to load from scenes/skull.babylon: importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [May 11, 2023, 11:16pm UTC](https://forum.babylonjs.com/t/playground-template-not-loading-model-in-html/40718/3 "2023-05-11T23:16:52Z")

</div>

One needs a kind of localhost to open such files, otherwise there will be CORS error.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/0/7/0758983bf8f1fec2275f87c85e3473b7db80d63c.png)  
So the solution is to open the downloaded example on localhost, not from the computer file system.

---

<div class="post-metadata">

**Author:** ![Amirhameed\_Amirjalal](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/amirhameed_amirjalal/32/32012_2.png) [@Amirhameed\_Amirjalal](https://forum.babylonjs.com/u/Amirhameed_Amirjalal)\
**Post date:** [May 13, 2023, 10:50pm UTC](https://forum.babylonjs.com/t/playground-template-not-loading-model-in-html/40718/4 "2023-05-13T22:50:24Z")

</div>

Thank you! That helped with the html , although, my app.js code in vite now has the same problem, any suggestions?

---

<div class="post-metadata">

**Author:** ![Amirhameed\_Amirjalal](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/amirhameed_amirjalal/32/32012_2.png) [@Amirhameed\_Amirjalal](https://forum.babylonjs.com/u/Amirhameed_Amirjalal)\
**Post date:** [May 13, 2023, 10:51pm UTC](https://forum.babylonjs.com/t/playground-template-not-loading-model-in-html/40718/5 "2023-05-13T22:51:50Z")

</div>

this is the code:[GitHub - AmirAce/BabylonWebsite](https://github.com/AmirAce/BabylonWebsite)

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [May 14, 2023, 12:48am UTC](https://forum.babylonjs.com/t/playground-template-not-loading-model-in-html/40718/6 "2023-05-14T00:48:52Z")

</div>

You need to import loaders as well

```auto
import "@babylonjs/loaders/glTF";

```

and make sure that your relative paths do work.  
There is a lot of examples here and everywhere how to use Vite with Babylon.js

---

<div class="post-metadata">

**Author:** ![Amirhameed\_Amirjalal](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/amirhameed_amirjalal/32/32012_2.png) [@Amirhameed\_Amirjalal](https://forum.babylonjs.com/u/Amirhameed_Amirjalal)\
**Post date:** [May 14, 2023, 1:04am UTC](https://forum.babylonjs.com/t/playground-template-not-loading-model-in-html/40718/7 "2023-05-14T01:04:21Z")

</div>

I imported the loaders as well, but its still not working, I tried to search tutorials but there is not a lot of documentation, so Im kindof confused as to what Im doing wrong, but I appreciate the help!

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [May 14, 2023, 1:18am UTC](https://forum.babylonjs.com/t/playground-template-not-loading-model-in-html/40718/8 "2023-05-14T01:18:57Z")

</div>

Here is one of the simplest Vite+Babylon templates with nice article - [Getting started with Babylon.js using Vite and GitHub actions | by Viktor | Medium](https://vsotov.medium.com/getting-started-with-babylon-js-using-vite-and-github-actions-c06955d3f79a)  
Source - [GitHub - sotovviktor/babylonjs-project](https://github.com/sotovviktor/babylonjs-project)  
Another template - [GitHub - paganaye/babylonjs-vite-boilerplate](https://github.com/paganaye/babylonjs-vite-boilerplate)  
Forum post - [How to Vite with Babylon.js (Game Tutorial Series)](https://forum.babylonjs.com/t/how-to-vite-with-babylon-js-game-tutorial-series/33845)
