Black texture noob question

Hi i’m trying to create a simple code, were the Moon is revolving around the Earth. I know that there is an example but i don’t know why it doesn’t work. my problem is that everything works perfectly until i apply the texture on the planet. when i write map: earthtex, the sphere appears black, otherwise is appears with color 0x00aaff

var terraGeometry = new THREE.SphereGeometry(8,20,20);
var earthtex = new THREE.TextureLoader().load("earth_atmos_2048.jpg");
var terraMaterial = new THREE.MeshPhongMaterial({
		color: 0x00aaff,
		wireframe: false,
		map: earthtex 
		});
var terra = new THREE.Mesh(terraGeometry,terraMaterial);

Any chances to demonstrate this issue with a live example? It seems applying a texture on a sphere geometry seems to work fine like shown here: https://pouncing-marbled-cardamom.glitch.me/

excuse me but i’m new to this forum. what do you mean by live example? also, the link you shared doesn’t work.

It renders for me a nice textured sphere. Maybe it works for you when using another service. Try this URL:

https://jsfiddle.net/107h3o68/

The idea is that you modify this fiddle in order to reproduce the problem.

omg thank you so much! looks like i missed that script, and nothing worked properly.problem completely solved, thanks !! xD