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

149
Views
I cannot import three.js correctly

I wanted to share the work of my first explorations with three.js with a co-worker. Locally everything looked correct, but when I tried to upload my project to GH Pages I got this error constantly:

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

I tried updating the import links in my script.js file, but I can't seem to fix it. This is how I currently have the links.

import * as THREE from 'https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js'
import { OrbitControls } from 'https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js'
import * as dat from 'dat.gui'

and I got the same error but applied to 'dat.gui'.

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

Here is the repository

Thanks in advance

about 4 years ago · Juan Pablo Isaza
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!