# Error with SceneLoader.ImportMeshAsync in Vue/Vite & BabylonJS(6.33.2): Seeking Help with glTF Loader Issue

**URL:** <https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415>\
**Category:** Bugs\
**Tags:** gltffileloader, loaders\
**Created:** [December 13, 2023, 10:46pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415 "2023-12-13T22:46:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreisoroka](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andreisoroka/32/36612_2.png) [@andreisoroka](https://forum.babylonjs.com/u/andreisoroka)\
**Post date:** [December 13, 2023, 10:46pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/1 "2023-12-13T22:46:32Z")

</div>

Hi there!

Reproduce:

> **Reproduce (click here)**
>
> 1. `npm create vue@latest`
> 
> ```auto
> ✔ **Project name:** … babylon-reproduce-bug
> ✔ **Add TypeScript?** … Yes
> ✔ **Add JSX Support?** … No
> ✔ **Add Vue Router for Single Page Application development?** … No
> ✔ **Add Pinia for state management?** … No
> ✔ **Add Vitest for Unit Testing?** … No
> ✔ **Add an End-to-End Testing Solution?** › Playwright
> ✔ **Add ESLint for code quality?** … Yes
> ✔ **Add Prettier for code formatting?** … Yes
> 
> ```
> 
> 1. Install default setup: `cd babylon-reproduce-bug; npm install; npm run format; npm run dev;`
> 2. Install Babylon `npm i @babylonjs/core @babylonjs/loaders @babylonjs/havok`
> 3. Add to `vite.config.ts`:
> 
> ```json
> optimizeDeps: {
> // https://forum.babylonjs.com/t/unable-to-load-havok-plugin-error-while-loading-wasm-file-from-browser/40289/28?page=2
> exclude: ['@babylonjs/havok'],
> },
> 
> ```
> 
> because without it will be:
> 
> ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/e/6ebaf76c64b683928d1a6c5c442bcd98d6f8065a.png)
> 
> 1. App.vue
> 
> ```vue
> <script setup lang="ts">
> import "@babylonjs/loaders/glTF"
> import HavokPhysics from '@babylonjs/havok'
> import { ref } from 'vue'
> import { Engine } from '@babylonjs/core'
> 
> const canvas = ref<HTMLCanvasElement>();
> 
> HavokPhysics().then((hk) => {
> if (!canvas.value) {
> return;
> }
> console.log(hk) // temp
> 
> new Engine(canvas.value, true, {
> preserveDrawingBuffer: true,
> stencil: true,
> })
> // ....
> });
> </script>
> 
> <template>
> <canvas ref="canvas"/>
> </template>
> 
> ```

**Result:**

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/d/9d7738b6fbbf9e263a244ac9d313a11ae67f7f2f.png)

```auto
flowGraphExecutionBlock.ts:12 Uncaught TypeError: Class extends value undefined is not a constructor or null
    at flowGraphExecutionBlock.ts:12:7
(anonymous) @ flowGraphExecutionBlock.ts:12

```

**My goal:** Just call the function SceneLoader.ImportMeshAsync(…), but `@babylonjs/loaders/glTF` doesn’t work

---

<div class="post-metadata">

**Author:** ![andreisoroka](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andreisoroka/32/36612_2.png) [@andreisoroka](https://forum.babylonjs.com/u/andreisoroka)\
**Post date:** [December 13, 2023, 11:03pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/2 "2023-12-13T23:03:13Z")

</div>

It is funny, but I changed all code to babylonjs and babylonjs-loaders ([NPM Support | Babylon.js Documentation](https://doc.babylonjs.com/setup/frameworkPackages/npmSupport)) instead of @babylonjs/core and “@babylonjs/loaders” and now all is working

---

<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:** [December 13, 2023, 11:03pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/3 "2023-12-13T23:03:18Z")

</div>

Try `@babylonjs/loaders` instead of `@babylonjs/loaders/glTF`

---

<div class="post-metadata">

**Author:** ![andreisoroka](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andreisoroka/32/36612_2.png) [@andreisoroka](https://forum.babylonjs.com/u/andreisoroka)\
**Post date:** [December 13, 2023, 11:04pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/4 "2023-12-13T23:04:06Z")

</div>

> Try `@babylonjs/loaders` instead of `@babylonjs/loaders/glTF`

I tried, didn’t 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:** [December 13, 2023, 11:05pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/5 "2023-12-13T23:05:01Z")

</div>

This Vue/Babylon/Havok example may help - [GitHub - armomu/ergoudan: Havok physics character controller demo using Babylon.js 6](https://github.com/armomu/ergoudan)

---

<div class="post-metadata">

**Author:** ![andreisoroka](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andreisoroka/32/36612_2.png) [@andreisoroka](https://forum.babylonjs.com/u/andreisoroka)\
**Post date:** [December 13, 2023, 11:55pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/6 "2023-12-13T23:55:54Z")

</div>

Hmmm… I can’t find a fundamental difference at the moment. I’ll set up it locally tomorrow and compare, thanks

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [December 14, 2023, 12:27pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/7 "2023-12-14T12:27:32Z")

</div>

Oh! cc @carolhmj who has fixed this issue in an active PR.

---

<div class="post-metadata">

**Author:** ![andreisoroka](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andreisoroka/32/36612_2.png) [@andreisoroka](https://forum.babylonjs.com/u/andreisoroka)\
**Post date:** [December 14, 2023, 8:25pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/8 "2023-12-14T20:25:09Z")

</div>

hm, I didn’t find this PR. Could you provide the link?

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [December 15, 2023, 9:41am UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/9 "2023-12-15T09:41:55Z")

</div>

Was merged yesterday, I am releasing 6.34.1 right now.  
PR that fixed it - [fix circular dependency by carolhmj · Pull Request #14612 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/14612)

---

<div class="post-metadata">

**Author:** ![andreisoroka](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andreisoroka/32/36612_2.png) [@andreisoroka](https://forum.babylonjs.com/u/andreisoroka)\
**Post date:** [December 15, 2023, 2:23pm UTC](https://forum.babylonjs.com/t/error-with-sceneloader-importmeshasync-in-vue-vite-babylonjs-6-33-2-seeking-help-with-gltf-loader-issue/46415/10 "2023-12-15T14:23:48Z")

</div>

I checked. Version 6.34.1 resolves my topic 🔥 👍
