Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

277
Vistas
ThreeJS importing FBXLoader gives a filepath error

I've been trying to set up a testing enviroment for the purpose of learning ThreeJS. When trying to import the FBXLoader from ThreeJS I've encountered a problem. For some reason i get the following error:

Uncaught TypeError: Failed to resolve module specifier "three". Relative references must start with either "/", "./", or "../".

I've tried using every possible path format i could think of but it doesn't seem to solve the problem. The same file format i'm currently using seems to work perfectly fine for importing three.module.js though.

The code in my main.html:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>My first three.js app</title>
        <style>
            body { margin: 0; }
        </style>
        <!-- <script src="node_modules/three/build/three.js"></script>
        <script src="node_modules/three/examples/jsm/loaders/FBXLoader.js"></script> -->
    </head>
    <body>
        <script type="module" src="/node_modules/main.js"></script>
    </body>
</html>

The code in main.js (everything else is commented out to solve this error):

 import { FBXLoader } from "./three/examples/jsm/loaders/FBXLoader.js"

What am i doing wrong?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I found out that i need a bundler for this import. I installed webpack, and now it seems to be working.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda