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

251
Visualizações
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
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