Wizzac
Wizzac

Reputation: 23

three.js import ERROR 404 ( File Not Found ) for a existing file

GET http://localhost:port/js/three net::ERR_ABORTED 404 (Not Found)

I am trying to make a web-dev project of my own using Three JS. I have downloaded ThreeJS master Zip from Three JS Official Website

Copied the JS files from Build folder and have started to work on the project.

My Dir Structure Looks Like:

enter image description here

And imported ThreeJS in my JS File ( Globe.js ) as :

import * as THREE from './three'

Script in My index.html inside as i want the element in a div inside body.

<script type="module" src="./js/globe.js"></script>

Upvotes: 0

Views: 832

Answers (1)

Wizzac
Wizzac

Reputation: 23

Figured it Out


Read Readme for Three JS and found i imported it wrong in my JS file

It should be as :

import * as THREE from './three.js'

what a silly mistake !! LMAO

Upvotes: 2

Related Questions