I think it is due to not using roxygen2’s version. I was able to reproduce the error but then noticed I had roxygen2’s CRAN version installed. I installed roxygen2’s dev version (pak::pak("r-lib/roxygen2")
) and the error went away. Could you please confirm it works for you?