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

445
Views
how do you use threejs WITHOUT using node.js, express, or a build tool?

Goal: import the modules and get going...

Problem: the jsm stuff like OrbitControls.js import from 'three'; which results in an error:

[Error] TypeError: Module specifier, 'three' does not start with "/", "./", or "../". promiseReactionJob

Suggestions range anywhere from manually copying the files out of node_modules and modifying the path, to waiting for browsers to support naked paths. In the meantime however I'd really like to get on with my life and use the tool on a standard server...

What's the best practice for NON node servers here?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The offical answer is that these jsm components are listed under "examples" for a reason, you are supposed to duplicate and edit them for your own app, so swapping in absolute paths is completely fine.

Generally I prefer to not touch anything in the node_modules folder, but in this case it's actually recommended by three.js

You can read more about module resolution here.

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!