Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

276
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda