Fix : Error compiling for board SparkFun ESP8266 Thing Dev

Fix : Error compiling for board SparkFun ESP8266 Thing Dev

Recently I was trying to setup Arduino with my newly brought SparkFun Thing Dev Board and surprisingly I had been facing a strange issue while compiling it which states

“open C:\Users\{username}\AppData\Local\Temp\arduino_build_773581\sketch\app.ino.cpp: The process cannot access the file because it is being used by another process.Error compiling for board SparkFun ESP8266 Thing Dev.”

Every time I am opening the Arduino board and compiling the app.ino.cpp file which was located in a different directory, this file was getting generated in Temp directory. Seems to me a permission issue but being an administrator, I was surprised to get this issue again and again.

Finally, I found the resolution which was so simple to do.

Get to the environment variables of the system and change the value of TEMP and TMP variable to C:\Temp instead of %USERPROFILE%\AppData\Local\Temp.

That’s it, everything started working as expected. Complied successfully and then uploaded it to the board without any issue. Hope this helps for someone who is facing similar issue