# ReferenceError: THREE is not defined

**URL:** <https://discourse.threejs.org/t/referenceerror-three-is-not-defined/8580>\
**Category:** Questions\
**Tags:** getting-started\
**Created:** [July 18, 2019, 11:34am UTC](https://discourse.threejs.org/t/referenceerror-three-is-not-defined/8580 "2019-07-18T11:34:22Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![hermann](https://avatars.discourse-cdn.com/v4/letter/h/b487fb/32.png) [@hermann](https://discourse.threejs.org/u/hermann)\
**Post date:** [February 20, 2023, 1:51pm UTC](https://discourse.threejs.org/t/referenceerror-three-is-not-defined/8580/12 "2023-02-20T13:51:39Z")

</div>

I don’t get it. So is it not possible to use the official version of threejs, to include the 3js code in an external file? It just strikes me as so odd if the correct way to install threejs, is something completely different than what’s on the website itself. Will this, slightly modified version of 3js come back to haunt me later?

And when I do use this other version, I get error “Three.Scene is not a constructor”.

I am having the same question as the author here. But apparently not with the same answer.

> [@3js not recognized when within script file](https://discourse.threejs.org/t/3js-not-recognized-when-within-script-file/48245):
>
> I am trying to install the latest version of 3js. I go by the directions on the 3js website, here: [https://threejs.org/docs/index.html#manual/en/introduction/Installation](https://threejs.org/docs/index.html#manual/en/introduction/Installation) I am doing part: “Install from CDN or static hosting”. I have downloaded the library onto my computer, so I am referring to my own file there. Using this, I can run 3js code. But the problem is, if I try to run that given code in it’s own file, like this: \<script src="./thecode.js"\>\</script\> I get error: Uncaught Ref…

---

_[View the full topic](https://discourse.threejs.org/t/referenceerror-three-is-not-defined/8580)._
