Error loading .glb and .glTF file locally

I’m having issues loading glTF and glb files using @babylonjs/loaders

I have tried searching but everything on the forums hasnt worked for me.
Here is the code i’m trying to run:
I have imported both @babylonjs/core and @babylonjs/loaders and i’ve even tried directly with the /glTF

SceneLoader.ImportMesh(“”, models/, “object.glb”, scene)

The error is:

Uncaught TypeError: this._progressCallback is not a function
at GLTFFileLoader._onProgress (webpack-internal:///(:3000/app-client)/./node_modules/@babylonjs/loaders/glTF/glTFFileLoader.js:642:14)
at XMLHttpRequest.eval (webpack-internal:///(:3000/app-client)/./node_modules/@babylonjs/loaders/glTF/glTFFileLoader.js:616:18)

I’m using nextjs/react, my glb and glTF files are located in the public folder public/models/object.glb formatted correctly. I’ve loaded my glb and glTF directly into the sandbox through the drag and drop and went through all validation tools to double check my files werent corrupted etc.

I have no problems using .obj with the imported @babylonjs/loaders

    "@babylonjs/core": "^6.6.1",
    "@babylonjs/inspector": "^6.6.1",
    "@babylonjs/loaders": "^6.14.0",
    "bufferutil": "^4.0.7",
    "eslint": "8.42.0",
    "eslint-config-next": "13.4.4",
    "next": "13.4.4",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "": "^4.7.1",
    "utf-8-validate": "^5.0.10"

Has anyone else ran into this issue?

Welcome abroad!

Can you share a sample of your project?

I just fixed it thanks for the quick reply. I was just about to post. It looked like some the loader modules were bugging out not passing onSuccess properly. I realized the packages were out of date and I just updated them all is good.

Very odd