I finally found that the error I was experiencing is due to the location of the project location (directory) I am working with which was different from the current directory.
In addition to this, I found that I needed to knit the document to html before proceeding to publishing it.
The issue has been now addressed, thanks!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…