Arduino Sketch: NodeMCU compilation error
Do a full uninstall of Arduino, then delete the Arduino folder and
  Arduino15 (back them up first if you have any sketches in there!!!!),
  as well as any Arduino folders under Temp. Make sure the folders and
  all contents are really gone, reboot and try again if not. Then, do a
  clean install of the IDE.


Cited from here.