The exact same thing is happening to me, I’ve been using platformio for months now and all of the sudden it is not working, when I uninstalled and try to install again, I get the same error message, the same goes for other terminal IDEs I’ve tried to install
The error message is quite descriptive. You need a C++ compiler (Visual Studio). This might be related to Atom now using Electron 6.
If you are on Windows you can run
npm install --global windows-build-tools@4 from an elevated (run as Admin) Powershell prompt.