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.
Pete.