Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

645
Vistas
How to get three.js project to work on browser when using parcel deployed with vercel?

I used Parcel as my web bundler and three.js and pushed this project to github and deployed it with Vercel. It runs perfectly fine with no errors on my local host (parcel index.html ->http://localhost:1234).

However, it does NOT run on vercel. It says this in the console:

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

enter image description here

These are the lines it is refering to (Experience:1):

import * as THREE from "three"; //this line 
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";

I tried adding "/" or "./" or "../" but this just breaks my application and it no longer runs on my localhost.

Here's my package.json

{
  "name": "audio-visualizer-tutorial",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",

  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "gsap": "^3.8.0",
    "lil-gui": "^0.14.0",
    "regenerator-runtime": "^0.13.9",
    "three": "^0.135.0"
  },
  "devDependencies": {
    "@babel/plugin-transform-runtime": "^7.16.4",
    "glslify-bundle": "^5.1.1",
    "glslify-deps": "^1.3.2",
    "parcel-plugin-static-files-copy": "^2.6.0"
  }
}

Here's are my directories: enter image description here

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda