cleanup errors to compile js