I think your problem is that casperjs checks if the ANSICON environment variable is set on Windows, and if it is not set, it does not try to smooth out the output. Unfortunately, when you install ansicon the way you did, it does not actually set this variable in the environment in the usual way. Instead, it uses a rough hack to install it in the environment of the initial cmd.exe window process, but only if this cmd process tries to get its value. Since nothing usually uses the ANSICON environment ANSICON , this means that it usually will not be visible to another process (for example, casperjs ) in this window.
If this is a problem, all you have to do is set the ANSICON variable before running casperjs :
set ANSICON=%ANSICON%
You can also make this a permanent part of the environment using setx ANSICON=foo .
source share