@Fandu_ilham please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code, so that it displays correctly.
Triple backticks look like this:
```
I’d also suggest that you provide details of how you are connecting your relay to your NodeMCU and how you are powering your relay.
Information about the datastream types you’ve configured would also be useful.
I just connect the pins from D0 to D3 to pins in relay module (i used 4 channel), and VIN pin in nodemcu to VCC pin in relay module, and GND in nodemcu to GND pin in relay module.
About powering, i just using from port of PC and phone charger.
There is a good chance that the relay is pulling GPIO0 (pin D3) LOW, which puts your board in programming mode and prevents it from executing the sketch.
You should read this, and choose better pins…
Also, if you use Digital datastreams rather than Virtual datastreams then your relays will probably be activated for a short time when the device powers on.
And as @John93 also said, it’s a really good idea to use an external power supply to power your relays, as the NodeMCU can brown-out because there is insufficient power available when you activate the coils on multiple relays simultaneously.