Argument `proc.fun` for `set_knit_hooks` caused an error when processing output; see prior error.

Error in proc.fun(x = x, class = class) : new proc fun
Error in res3[["new.hooks"]][["warning"]]("hello\033[31mworld") : 
  Argument `proc.fun` for `set_knit_hooks` caused an error when processing output; see prior error.

Retrieved 'output' hook is not a function; are you sure you passed `knitr::knit_hooks` as the `hooks` argument?  Quitting after setting 0/1 hooks

Set hooks:  output 
<STYLE type='text/css' scoped>
PRE.fansi SPAN {padding-top: .25em; padding-bottom: .25em};
</STYLE>
$output
NULL

Warning in set_knit_hooks(h.2) :
  Retrieved 'output' hook is not a function; are you sure you passed `knitr::knit_hooks` as the `hooks` argument?  Quitting after setting 0/1 hooks

Failed retrieving 'output' hook from the knit hooks; are you sure you passed `knitr::knit_hooks` as the `hooks` argument?  Quitting after setting 0/1 hooks

Error in hooks$get(hook.name) : error in get
Warning in set_knit_hooks(h.3) :
  Failed retrieving 'output' hook from the knit hooks; are you sure you passed `knitr::knit_hooks` as the `hooks` argument?  Quitting after setting 0/1 hooks

Failure while trying to set hooks; see prior error; are you sure you passed `knitr::knit_hooks` as the `hooks` argument?

<STYLE type='text/css' scoped>
PRE.fansi SPAN {padding-top: .25em; padding-bottom: .25em};
</STYLE>
$output
function() "old.hook"
<environment: 0x13ba37358>

Error in (function (...)  : error in set
Warning in set_knit_hooks(h.4) :
  Failure while trying to set hooks; see prior error; are you sure you passed `knitr::knit_hooks` as the `hooks` argument?

Error in set_knit_hooks(h.1, style = NULL) : 
  Argument `style` must be character.

Argument `class` should be a character vector the same length as `which`.

Error in set_knit_hooks(h.1, class = 1:10) : 
  Argument `class` should be a character vector the same length as `which`.

Error in set_knit_hooks(h.1, class = letters) : 
  Argument `class` should be a character vector the same length as `which`.