Why the shadow is not displayed?

I have this code
var camera = new THREE.PerspectiveCamera(65, 1000 / 600, 0.1, 20000 );
camera.position.set( 350, 325, 650 );

renderer.shadowMap.enabled = true;  

var DiLight = new THREE.DirectionalLight(0xFDFCEB, 0.5)  
DiLight.castShadow = true; 
DiLight.visible = false; 
DiLight.shadow.camera.left = -100;
DiLight.shadow.camera.bottom = -100;
DiLight.shadow.camera.right = 100;
DiLight.shadow.camera.top = 100;
scene.add(DiLight);

var  plane = new THREE.Mesh( new THREE.PlaneBufferGeometry( 5000, 5000 ),  THREE.MeshStandardMaterial( { color: 0x808080, roughness: 0, metalness: 0 } ) );
plane.rotation.x = floor_rotat ;
plane.receiveShadow = true;
plane.position.y = -200 ;
scene.add(  plane );

var bdf = new THREE.Mesh(new THREE.BoxBufferGeometry(400, 400, 400), THREE.MeshStandardMaterial( { color: 0x808080, roughness: 0, metalness: 0 } ));
bdf.receiveShadow = true;
scene.add( bdf );	

But for some reason, the shadow is not displayed and I changed the size
Can something affect the display of the shadow or something I forgot to include
I can’t give all the code because it’s too long.

I think your problem lies in DiLight.visible = false; Try removing this line. Also, make sure you give your directional light a position like DiLight.position.set(1, 1, 1); so it’s pointing top-down, instead of sitting horizontally.