What happens if you lime test flash that same project, from the command-line? Does it work, or does it throw the same error? You can also run haxelib list to see what libraries and versions you have installed, or run lime display flash to see what flags it will use to compile the project, it should include -lib openfl or -cp path/to/openfl
And if so, are you trying to compile a project on a different drive-letter than the one you have Haxe / Lime / OpenFL installed on?
Not sure if this actually makes a difference, but I would guess that even if you setup your System Variables to include the paths to H/L/OpenFL, it still wouldn’t find it from a different drive letter (could be wrong though).
Then there’s always the “Have you tried turning it off and on again” solution. Sometimes in FlashDevelop, I’d have to close and reopen it (like it’s holding a handle to the CMD window or something).