PlatformIO ESP32 Compilation Error after failing to populate .pio/build

I have been trying to troubleshoot an extremely odd compilation error for the ESP32, specifically the Adafruit Feather ESP32-S3 2MB PSRAM. I attempted to compile an empty project. The error code is below, and didn’t provide many details.

*** [.pio\build\adafruit_feather_esp32s3\FrameworkArduinoVariant\variant.cpp.o] Error 1
*** [.pio\build\adafruit_feather_esp32s3\src\main.cpp.o] Error 1

After reinstalling VSCode, PlatformIO, Arduino, and even Python multiple times (clean installs, completely removing all traces of all 4), I tried to compile an empty project on a different computer. Interestingly, it worked the first time. I thus decided to compare the differences between the two systems. While the other computer successfully populated the .pio/build/adafruit_feather_esp32s3 folder with FrameworkArduinoVariant, FrameworkArduino, and src, the first computer did not. In fact, after transferring the entire project folder to the first computer, the first computer deleted everything in .pio/build/adafruit_feather_esp32s3 when I tried building the project. I am at a loss as to what might cause this. I have my antivirus off and have already reinstalled it multiple times.

Please show the complete error message. I think there must be more.
Also share the platformio.ini of this project

Did you also wipe the platforms and packages directories?
If the answer is not:

  • close VS Code
  • delete C:\Users\<username>\.platformio\platforms and C:\Users\<username>\.platformio\packages
  • start VS Code
  • open your project
  • wait until PlatformIO finished all tasks (installing the necessary platform files)

That was the entire error message. Previous messages were not errors and were just compilation messages, and were the same on my other computer. I also cleared the entire <username>\.platformio folder when reinstalling as well.

I ended up reinstalling windows (partially just to fix this) and it seems to have solved the problem. Still unsure what was causing it, perhaps some hidden folder. Not exactly the solution I was hoping for, but it seems to have worked.