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

476
Views
Los especificadores de módulos relativos deben comenzar con "./", "../" o "/"

Estoy tratando de importar tres.js. Estoy siguiendo la documentación, sin embargo, recibo el error:

 Uncaught TypeError: Error resolving module specifier “three”. Relative module specifiers must start with “./”, “../” or “/”

Mis declaraciones de importación:

 <script async src="https://unpkg.com/es-module-shims@1.3.6/dist/es-module-shims.js"></script> <script type="importmap"> { "imports": { "three": "https://unpkg.com/three@0.139.2/build/three.module.js" } } </script> <script type="module"> import * as THREE from 'three'; const scene = new THREE.Scene(); </script>

¿Lo estoy importando mal? ¿Dónde pondría el “./”, “../” o “/”?

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

0

Siento que está complicando demasiado las cosas con los mapas de importación, y está introduciendo el riesgo de un soporte de navegador muy deficiente , como lo mencionó TheJim01.

Simplemente copie el archivo three.module.js de https://unpkg.com/three@0.139.2/build/three.module.js a una carpeta local en su aplicación como /libraries/three.module.js .

Luego importarlo con

 <script type="module"> import * as THREE from './libraries/three.module.js'; const scene = new THREE.Scene(); </script>
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!