# Vercel website don't show the loaded model from Vite public folder

**URL:** <https://discourse.threejs.org/t/vercel-website-dont-show-the-loaded-model-from-vite-public-folder/67620>\
**Category:** Questions\
**Tags:** vite, models\
**Created:** [July 2, 2024, 5:48pm UTC](https://discourse.threejs.org/t/vercel-website-dont-show-the-loaded-model-from-vite-public-folder/67620 "2024-07-02T17:48:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iHast](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ihast/32/34649_2.png) [@iHast](https://discourse.threejs.org/u/iHast)\
**Post date:** [July 2, 2024, 5:48pm UTC](https://discourse.threejs.org/t/vercel-website-dont-show-the-loaded-model-from-vite-public-folder/67620/1 "2024-07-02T17:48:43Z")

</div>

The problem begins when I deploy the website. The website go live but when I get on the scene of the model I receive:

> SyntaxError: Unexpected token ‘v’, “version ht”… is not valid JSON  
> at JSON.parse ()  
> at sM.parse (index-DLKXDEuM.js:3841:113086)  
> at Object.onLoad (index-DLKXDEuM.js:3841:112230)  
> at index-DLKXDEuM.js:3841:87116

I made the config:

```javascript
import { defineConfig } from 'vite';

export default defineConfig({
  assetsInclude: ["**/*.glb"],
});

```

I have some projects on vercel using vite, but It’s the first time I created my own model.

Can you help me figure out what I made wrong?

---

<div class="post-metadata">

**Author:** ![Omar\_Shehata](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/omar_shehata/32/43576_2.png) [@Omar\_Shehata](https://discourse.threejs.org/u/Omar_Shehata)\
**Post date:** [July 2, 2024, 5:57pm UTC](https://discourse.threejs.org/t/vercel-website-dont-show-the-loaded-model-from-vite-public-folder/67620/2 "2024-07-02T17:57:20Z")

</div>

if you look at the network tab, does it show that the request to the glb model succeeds? if not, what does it return?

I think you can also test this locally by running `vite build` and then locally hosting/inspecting the build file? to see if the glb file is correctly copied?

basically, the core issue is that you want the glb files to be hosted statically, so you need to be able to open a URL in your web app that has the glb file and for it to load/download

see also same issue here (although it looks like you already have the `assetsInclude` part set, so not sure why it’s not working. If you’re able to post your project on github or share a link to it or something I can take a deeper look

> [@Threejs / Vite / Blender GLB File - Not Loading](https://discourse.threejs.org/t/threejs-vite-blender-glb-file-not-loading/67419/13):
>
> Change imports import vertexShader from './shaders/vertexShader.vert'; import fragmentShader from './shaders/fragmentShader.frag'; import glbFileUrl from './models/pow-mylar-grape-escape.glb'; import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js'; also rename the shader to use the appropriate extension, otherwise the plugin doesn’t compile it correctly. Copy over Draco Decoder files to /public/draco from /node\_modules/three/examples/jsm/libs/draco Replace the loading code: const…

---

<div class="post-metadata">

**Author:** ![iHast](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ihast/32/34649_2.png) [@iHast](https://discourse.threejs.org/u/iHast)\
**Post date:** [July 4, 2024, 6:18am UTC](https://discourse.threejs.org/t/vercel-website-dont-show-the-loaded-model-from-vite-public-folder/67620/3 "2024-07-04T06:18:24Z")

</div>

Thank you for answering, @Omar_Shehata!  
As you suggested, I made some analysis on network tab and the scene was fetched:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/d/c/dc0f23c96d205f6a037e351685061457871ad2e8.png)  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/4/0/409510e16cb982d40dad3f70eee2d9105ad98205.png)

I made tests with gltf and glb and received the same result.

I uploaded the project on github:

> **[GitHub - CarlosHenriqueMkt/office-room: Simple and Clean](https://github.com/CarlosHenriqueMkt/office-room)**
>
> Simple and Clean. Contribute to CarlosHenriqueMkt/office-room development by creating an account on GitHub.

and I deployed on Vercel:  
[https://nacffo-office-room.vercel.app/](https://nacffo-office-room.vercel.app/)

---

<div class="post-metadata">

**Author:** ![iHast](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ihast/32/34649_2.png) [@iHast](https://discourse.threejs.org/u/iHast)\
**Post date:** [July 4, 2024, 6:23am UTC](https://discourse.threejs.org/t/vercel-website-dont-show-the-loaded-model-from-vite-public-folder/67620/4 "2024-07-04T06:23:23Z")

</div>

Oh god, now I think I know why:

> [@Problems loading GLTF on github pages](https://discourse.threejs.org/t/problems-loading-gltf-on-github-pages/22773/3):
>
> If you’re using Git LFS then you won’t be able to serve a model to github pages. That file content is the hash that LFS uses to download the file on git pull.

---

<div class="post-metadata">

**Author:** ![Omar\_Shehata](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/omar_shehata/32/43576_2.png) [@Omar\_Shehata](https://discourse.threejs.org/u/Omar_Shehata)\
**Post date:** [July 11, 2024, 1:45pm UTC](https://discourse.threejs.org/t/vercel-website-dont-show-the-loaded-model-from-vite-public-folder/67620/5 "2024-07-11T13:45:21Z")

</div>

yes you can see that in your network tab! You can’t actually download the gltf file from the served website and put it in blender (you can open it as a text file and see that it does not contain the contents)

---

<div class="post-metadata">

**Author:** ![Omar\_Shehata](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/omar_shehata/32/43576_2.png) [@Omar\_Shehata](https://discourse.threejs.org/u/Omar_Shehata)\
**Post date:** [July 11, 2024, 1:46pm UTC](https://discourse.threejs.org/t/vercel-website-dont-show-the-loaded-model-from-vite-public-folder/67620/6 "2024-07-11T13:46:53Z")

</div>

an easier way to see it is directly on github, you can see it is stored with git lfs:

 ![chrome_sxNmkfl3tE](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/2/3/23dd52526918cd3c6ff1b181315272bd63af545c.png)
