# GLTF2Export.GLBAsync function returning incorrect glb files in Vue.js

**URL:** <https://forum.babylonjs.com/t/gltf2export-glbasync-function-returning-incorrect-glb-files-in-vue-js/40960>\
**Category:** Questions\
**Tags:** vuejs, glb, gltf2export\
**Created:** [May 19, 2023, 1:02am UTC](https://forum.babylonjs.com/t/gltf2export-glbasync-function-returning-incorrect-glb-files-in-vue-js/40960 "2023-05-19T01:02:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwLee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jwlee/32/32304_2.png) [@jwLee](https://forum.babylonjs.com/u/jwLee)\
**Post date:** [May 19, 2023, 1:02am UTC](https://forum.babylonjs.com/t/gltf2export-glbasync-function-returning-incorrect-glb-files-in-vue-js/40960/1 "2023-05-19T01:02:51Z")

</div>

Hello everyone

I’m encountering an issue with the GLTF2Export.GLBAsync function in Babylon.js. When using this function to my scene or mesh to GLB, it seems to be returning incorrect glb files.  
I can’t open this glb file in [https://sandbox.babylonjs.com/](https://sandbox.babylonjs.com/) and also in my project.

Here’s the code I’m using:

```auto
import {Scene, Engine, FreeCamera, Vector3, HemisphericLight, MeshBuilder, CubeTexture, PBRMaterial, Texture, SceneLoader, Color3} from "@babylonjs/core"

import "@babylonjs/loaders"
import { GLTF2Export } from "babylonjs-serializers";

export class CustomModels{
    scene: Scene;
    engine: Engine;

    constructor(private canvas:HTMLCanvasElement){
        this.engine = new Engine(this.canvas, true);
        this.scene = new Scene(this.engine);

        const camera = new FreeCamera("camera", new Vector3(0,1,-5), this.scene);
        camera.attachControl();
        camera.speed = 0.25;

        const hemiLight = new HemisphericLight("hemiLight", new Vector3(0,1,0), this.scene);

        hemiLight.intensity = 1;

        const material = new PBRMaterial("pbr", this.scene);
        material.albedoColor = new Color3(1, 1, 1);
        material.metallic = 0;
        material.roughness = 0;
    
        const cube = MeshBuilder.CreateBox("cube", {}, this.scene);
        cube.position.y = 1;
        cube.material = material;

        // SceneLoader.ImportMeshAsync("","./models/", "test.glb");
        
        this.engine.runRenderLoop(()=>{
            this.scene.render();
        })

        GLTF2Export.GLBAsync(this.scene, "test").then((glb) => {
            glb.downloadFiles();
        });
    }
}

```

And versions are like this  
“@babylonjs/core”: “^6.4.0”,  
“@babylonjs/loaders”: “^6.4.0”,  
“babylonjs-serializers”: “^6.4.0”,  
“vue”: “^3.2.13”

I have try the same code in playground, and it works correctly

> **[Babylon.js Playground](https://playground.babylonjs.com/#6RKM2B%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

export by playground glb file is like this

 ![스크린샷 2023-05-19 오전 10.35.52](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/f/9fd086e47358b758b36df1d537d93124c60fefc2.png)

and export by my vue.js project file is like this

 ![스크린샷 2023-05-19 오전 10.36.59](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/5/7/57abd7fc436fa27ff014d744aec2b71f7e4822e9.jpeg)

I would appreciate any insights or suggestions on how to resolve this issue. Thank you!

---

<div class="post-metadata">

**Author:** ![jwLee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jwlee/32/32304_2.png) [@jwLee](https://forum.babylonjs.com/u/jwLee)\
**Post date:** [May 19, 2023, 4:41am UTC](https://forum.babylonjs.com/t/gltf2export-glbasync-function-returning-incorrect-glb-files-in-vue-js/40960/2 "2023-05-19T04:41:18Z")

</div>

I change  
“babylonjs-serializers”: “^6.4.0”  
to  
“@babylonjs/serializers”: “^6.4.0”,  
and fix it
