LaTeX error "Cannot find 'references.bib'!": cause and fix
Biber did not find the file named in \addbibresource{...} and stopped. The message is in the Biber log, the .blg file, as a line marked ERROR. In the LaTeX log you only see the consequences: undefined citations, an empty bibliography and the request to rerun Biber.
Why it happens
- The name in
\addbibresource{...}differs from the file name, for examplereferences.bibwhen the file isrefs.bib. - The extension is missing.
\addbibresource{refs}makes Biber look for a file calledrefs; the command needs the full namerefs.bib. - The
.bibfile lies in a subfolder and the command gives only the name.
How to fix it
- Write the full file name with
.biband compare it with the file, letter by letter. - Give the path from the main document:
\addbibresource{literature/refs.bib}. - After the fix, run Biber again and then LaTeX twice.
A document that produces the message
\documentclass{article}
\usepackage{biblatex}
\addbibresource{references.bib}
\begin{document}
The algorithm is described in \cite{knuth1984}.
\printbibliography
\end{document}File refs.bib:
@book{knuth1984,
author = {Donald E. Knuth},
title = {The TeXbook},
publisher = {Addison-Wesley},
year = {1984}
}Tools run in this order: pdflatex → biber.
The corrected document
\documentclass{article}
\usepackage{biblatex}
\addbibresource{refs.bib}
\begin{document}
The algorithm is described in \cite{knuth1984}.
\printbibliography
\end{document}Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.
Finding the line in the editor
The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.