NODEMCU -photoresistence problem?

You should measure the voltage at the LDR when it is uncovered and when it is covered to see if the electrical circuit is working properly. And tell us what the voltages are.

And it will be much easier to help if you post a diagram of the actual connections. Just make a pencil drawing and post a photo of it.

If you just want to use the LDR as a switch it should work fine if you read it with digitalRead().

...R