When we load our old project into new workspace then sometime the cache directory error generate.
The error shows (error 1119: Access of possibly undefined property cacheDirectory through a reference with static type Class).
So to remove this type of error you simply have to configure the path for your sdk which you are using.
This error is generaly due to missing of swc file ,eg- airglobal.swc. So after configuring the sdk error will removed.