Can't manage to load object in React-Typescript project "version: undefined, exporter version: undefinedimportScene"

Hi, I am trying to load an object in my React app, I have followed the steps on the docs I installed babylonjs-loaders but I get this error when I load my app and my object isn’t there.

BJS - [16:12:07]: Unable to load from BoomBox.glb: importScene of undefined from undefined version: undefined, exporter version: undefinedimportScene has failed JSON parse

I have searched on the internet and forum for people with the same error and usually, the problem was when loading the object or because of not importing the loaders, but in my case, the object is loaded I can see in the network tab of my browser. And the loaders are imported.

GET http://localhost:3001/BoomBox.glb

    Status
    304
    Not Modified
    VersionHTTP/1.1
    Transferred10.64 MB (10.73 MB size)
    Referrer Policyno-referrer-when-downgrade 

Here is the project with the error in a Github repo:

Thank you.

It looks like you are mixing es6 libraries using @babylonjs/core and umd ones with babylonjs-loaders.

You should only use one at a time:

  1. Babylonjs and babylonjs-loaders
    Or
  2. @babylonjs/core and @babylonjs/loaders
1 Like

Thank you, It kinda fixed the issue, I imported '@babylonjs/loaders' and * as BABYLON from '@babylonjs/core'. But now at load I have a new error

BJS - [17:41:00]: Unable to load from BoomBox.glb: Unexpected magic: 1329865020

Update: It works the error with Unexpected magic was because I broke accidentally the path.
Thank you :slight_smile: