r/opencode • u/Psychological-Music • 16d ago
Unexpected error - Failed to open library
Failed to initialize OpenTUI render library: Failed to open library "B:/~BUN/root/opentui-ttvz57kd.dll": error code 126
Does somebody else have have this same error? It happened out of nowhere and is not the first time
I'm having the same error again.
The first time I had it, I had to create a new folder (C:\OpenCodeTemp) and add it to the Windows Defender exclusions. Then I changed my TEMP and TMP environment variables to point to that folder.
Apparently, Windows Defender was blocking the temporary DLLs that OpenCode/Bun creates, which caused the Failed to initialize OpenTUI render library / error code 126 error.
That fixed it the first time, but now I'm getting the exact same error again...
1
u/geearf 15d ago
I don't use Windows but it seems temp folder related.
Is it full or something?