No applicable method for "accuracy" applied to an object of class "forecast" while knitting R

Please create a reprex: FAQ: What's a reproducible example (`reprex`) and how do I create one?

Otherwise there is no way to know what the issue is.