[macOS] Can not find active PlatformIO project [SOLVED]

I had to re-install Atom and PlatformIO on macOS 10.12.6. When I click on File -> Add Project Folder… I select my existing folder (/Users/***/Documents/PlatformIO/Projects) and all my projects appear under the project tab.

When I try to build any of the projects, I get the error “Can not find active PlatformIO project”. I can double-click on any main.cpp file of any project, and I always get the same error.

What am I doing wrong?

By adding each project folder one at a time, they now build again.