You are using undefined `eraseLine` `proc`
The correct is `stdout.eraseLine()` import strutils, terminal from os import sleep proc showBar(content: string) = stdout.eraseLine stdout.write("[$1]" % [content]) stdout.flushFile var content = ' '.repeat 10 for progress in 0 ..< 10: content[progress] = '#' sleep 100 showBar content