Unable to import a mesh locally into my scene!

I have meshes of type .obj that are placed in an asset folder in my react application and I am trying to import them locally and it just doesn’t work. How can I import a mesh from a local file that is in the same folder of the react project that I am working on?

Hi there. Here’s a thread I found about importing meshes.

From a summary looks like you’ll need babylonjs-loaders package and import it and there’s a code sample provided. :slight_smile:

Also providing an error message would best help us debug what seems to be the problem. If its not compiling, error on load, or loading just simply not showing up.

@msDestiny14
Heyy thank you! I was importing the shapes in the same way, here are some screenshots of how im importing it and the error message im getting in the browser.


" Error 431, which officially says “Request header fields too large,” means the server has dropped the request . The header sent by the user is either too long or too large, and the server denies it."

@aWeirdo
How do I fix it?

Difficult to say, depends what is causing the error.

Quick google;
Servers will often produce this status if:

Try clearing your cookies first, if it doesn’t work, i would log the error from the server-side, it should tell exactly what was wrong

@Jad_Matta This looks more like a generic server configuration issue not related to babylon and is unfortunately hard to fix for us as it can have a lot of various root cause depending on your tech stack.

Basically, you can load any file as long as you can access them through a url from your local server first :slight_smile: