SDK randomly can no longer find ENV variable?

Hello everyone,

Today out of the blue it can no longer find the ENV variable when I go to compile a project, was working fine a couple days ago. This is the error I'm getting:

CMake Error at CMakeLists.txt:20 (message):
SDK Path not found; set ENV value PLAYDATE_SDK_PATH

I'm on a Mac, building via command line. I checked the .zprofile file and it still has the var set in there, same as when it was working the other day:

export PLAYDATE_SDK_PATH=Developer/PlaydateSDK

Any ideas on what might be going on? We did have a power outage last night and that's the first time my computer has had a hard reset since I started this project, possible that affected it somehow?

Thanks in advance,

Try changing it to your full path: export PLAYDATE_SDK_PATH="/Users/<your home folder>/Developer/PlaydateSDK". That should certainly fix it up.

Thanks willco, still not working though, any other ideas?


Did you source the file before trying it again? Did you make sure the SDK is still installed at that location? Are you on the Mac or?

yeah I tried running "source .zprofile" but it didn't seem to do anything. SDK is still in the same location, & yes on a Mac

Something seems off, maybe the easiest thing would be to reinstall the SDK and try again?

ok I'll give that a shot, thanks :+1:

still getting the same error, deleted the PlaydateSDK folder and then reinstalled, not sure if there is a way to more completely uninstall it maybe?

it's weird, I can type "env" in the terminal and it shows me the var:


so it's in there, but for whatever reason now Playdate can't find it. Also this was running perfectly just a couple days ago, no changes to the code at any time during those couple days

How are you building? Are you building at the command line?

yeah command line, running these commands:

mkdir build

cd build

cmake ..


The path listed in your last post, PLAYDATE_SDK_PATH=/Developer/PlaydateSDK, isn't right. Double check your .zprofile path is correct and expanded...IIRC it won't expand relative paths to home.

That got it, thanks! It's weird bc it had been working on that path for a couple weeks now. I think it had to do with the reset closing the terminal window & sourcing the .zprofile, I didn't source the .zprofile the first time around.

For anyone seeing this in future, the solution seemed to be:

  1. updating the path to be the full path in the .zprofile file
  2. run "source .zprofile" in your home directory

should work after that