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

243
Views
Can't find file with javascript using modules. Failed to resolve module specifier

It's just all problems since I decided to learn Three.js. nothing seems to work the way intended even when following some tutorial. Here it can't even import for some reason. If you know why please share with me. Also if you know some source that I can learn Three.js from, that would also be great.

import * as THREE from "../node_modules/three/build/three.module.js"

import { TrackballControls } from "../node_modules/three/examples/jsm/controls/TrackballControls.js"

const scene = new THREE.Scene()
const camera = new THREE.PerspectiveCamera(75, window.innerWidth /
                                               window.innerHeight, 0.6, 1200)

const renderer = new THREE.WebGLRenderer({antialias: true})

renderer.setClearColor("#00000")

renderer.setSize(window.innerWidth, window.innerHeight)

document.body.appendChild(renderer.domElement)

window.addEventListener('resize', () => {
    renderer.setSize(window.innerWidth, window.innerHeight)
    camera.aspect = window.innerWidth / window.innerHeight
    camera.updateProjectionMatrix()
})

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

I ran: npm install --save three

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!