Tengo una estructura de archivos que se ve así: 
Mi index.js tiene este código
const THREE = require("three") var scene = new THREE.scene(); console.log(scene)Mi index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <div id="webgl-output">What the hell</div> <script src="./index.js"></script> </body> </html>No utilicé la etiqueta { type : "modules } en mi paquete.json. Sin embargo, sigo recibiendo el Error de referencia no detectada: el error require no está definido. ¿Puedo saber cuál es el motivo? ¡Gracias!
El error en mi servidor en vivo se ve así 
Este es mi paquete.json si está interesado
{ "name": "threejs-playground", "version": "1.0.0", "description": "", "main": "src/index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "three": "^0.133.1" } }