Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

284
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!