# Very simple project isn't working

**URL:** <https://discourse.threejs.org/t/very-simple-project-isnt-working/25593>\
**Category:** Questions\
**Tags:** getting-started\
**Created:** [April 22, 2021, 12:51pm UTC](https://discourse.threejs.org/t/very-simple-project-isnt-working/25593 "2021-04-22T12:51:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philippe\_Lhomme](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/philippe_lhomme/32/17823_2.png) [@Philippe\_Lhomme](https://discourse.threejs.org/u/Philippe_Lhomme)\
**Post date:** [April 22, 2021, 12:51pm UTC](https://discourse.threejs.org/t/very-simple-project-isnt-working/25593/1 "2021-04-22T12:51:46Z")

</div>

Hi everybody,

I have followed a lot of tutorial and I would like to go deeper in ThreeJS. While learning, I would like to forget boilerplate code with : npm, webpack, parcels and things like these.

Then I’m trying to start a very simple project in localhost with just :

- three.js downloaded

- index.html  
Only a link to stylesheet and 2 scripts :  
script type=“module” src=“js/three.js”  
script type=“module” src=“js/index.js”

- index.css  
html, body  
{  
margin: 0;  
padding: 0;  
}

- index.js  
let scene = new THREE.Scene()  
scene.background = new THREE.Color(0xbfbfbf)

- Project struture :  
src  
|-- css  
…|-- index.css  
|-- js  
…|-- index.js  
…|-- three.js // downloaded  
|-- index.html

I use VSC with Live Server plugin. The result is a black screen.  
Usually, I don’t have problems with coding, unless I start from scratch. I think I m missing something from the basics of front-end project, like ES6 module or something else.

Can someone tell me what is wrong in the project please ?

Thx

---

<div class="post-metadata">

**Author:** ![Philippe\_Lhomme](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/philippe_lhomme/32/17823_2.png) [@Philippe\_Lhomme](https://discourse.threejs.org/u/Philippe_Lhomme)\
**Post date:** [April 22, 2021, 1:23pm UTC](https://discourse.threejs.org/t/very-simple-project-isnt-working/25593/2 "2021-04-22T13:23:18Z")

</div>

I change script type=“module” src=“js/three.js” for  
script type=“module”\>import \* as THREE from ‘./js/three.js’\</

Of course : nothing in the console in Chrome development tools

---

<div class="post-metadata">

**Author:** ![seanwasere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/seanwasere/32/20864_2.png) [@seanwasere](https://discourse.threejs.org/u/seanwasere)\
**Post date:** [April 22, 2021, 1:24pm UTC](https://discourse.threejs.org/t/very-simple-project-isnt-working/25593/3 "2021-04-22T13:24:53Z")

</div>

> [@Philippe\_Lhomme](#):
>
> script type=“module” src=“js/three.js”

use `three.module.js` if using `type=module`  
`script type=“module” src=“js/three.module.js”`

here is a basic project, its using `three.module.js`  
[Edit fiddle - JSFiddle - Code Playground](https://jsfiddle.net/seanwasere/o6uxwmte/)

---

<div class="post-metadata">

**Author:** ![Philippe\_Lhomme](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/philippe_lhomme/32/17823_2.png) [@Philippe\_Lhomme](https://discourse.threejs.org/u/Philippe_Lhomme)\
**Post date:** [April 22, 2021, 1:57pm UTC](https://discourse.threejs.org/t/very-simple-project-isnt-working/25593/4 "2021-04-22T13:57:44Z")

</div>

> [@seanwasere](#):
>
> use `three.module.js` if using `type=module`  
> `script type=“module” src=“js/three.module.js”`

1 - Doing that result in : Uncaught ReferenceError: THREE is not defined  
I try to rename it : src=“js/three.js” as it is the name I use in the project : same error

2 - I try : script type=“text/javascript” src=“[https://threejs.org/build/three.js](https://threejs.org/build/three.js)” and my screen stay black with no errors → Maybe something related with the index.js module import or my ThreeJS code

3 - In the fiddle sample, all imports are from CDN, but I’m trying to set up a project with js code downloaded.

It really looks like I m misunterstanding something in project settings

---

<div class="post-metadata">

**Author:** ![Philippe\_Lhomme](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/philippe_lhomme/32/17823_2.png) [@Philippe\_Lhomme](https://discourse.threejs.org/u/Philippe_Lhomme)\
**Post date:** [April 22, 2021, 2:08pm UTC](https://discourse.threejs.org/t/very-simple-project-isnt-working/25593/5 "2021-04-22T14:08:00Z")

</div>

I just find it …  
Every black screen solutions are good.

I was missing : renderer.render(scene, camera)

Thx for your help !
