Lighting build failed

Just in case someone will encounter the same problem.
Check if the folder where Swarm located is not read-only. I had my SwarmAgent placed in a Program Files folder. Moving Swarm Agent to another drive helped to nail the issue