I had a similar issue before. I searched online for hours to find the solution and finally figured out.
You will get the error no \citation commands---while reading file
when you don't cite the references that you mention in bib file!
What does citation mean?
Before discussing what citation means, let's talk about the purpose of the bibliography. Bibliography is the section where you mention the list of references you went through (papers s or books you read). This helps the people to read those references when they don't find enough info in your paper. So, whenever you mention a particular term or sentence (referring to some paper in your bibliography section), you will be citing that term to that paper.
eg:
The issue_x is because of term_y \cite{cite_key}
In the bib file
@author{cite_key,
author = {xxxxx},
title = {yyyyyyyyyyyyyyyyyyyy},
year = {zzzzzz},
publisher = {ppppppp.},
address = {wwwwwwwwww},
}
So, In order to display the bibliography information, you have to cite the reference in you tex file as shown in the example.
Is there way you could mention the bibliography without citings?
Yes, as suggested by spike, you can use
\nocite{*}
(if you are not referring to any reference mentioned in bib)
\nocite{cite_key}
(reference with specific key)
Hope this helps someone! Sorry if I am wrong in my explanation but this is how I solved my issue.
\cite
commands in your document.\nocite{*}
before the bibliography command\nocite{*}
command before\printbibliography