  For every one-relator monoid $M = \langle A \mid u=v \rangle$ with $u, v \in
A^*$ we construct a contractible $M$-CW complex and use it to build a
projective resolution of the trivial module which is finitely generated in all
dimensions. This proves that all one-relator monoids are of type ${\rm
FP}_\infty$, answering positively a problem posed by Kobayashi in 2000. We also
apply our results to classify the one-relator monoids of cohomological
dimension at most $2$, and to describe the relation module, in the sense of
Ivanov, of a torsion-free one-relator monoid presentation as an explicitly
given principal left ideal of the monoid ring. In addition, we prove the
topological analogues of these results by showing that all one-relator monoids
satisfy the topological finiteness property ${\rm F}_\infty$, and classifying
the one-relator moniods with geometric dimension at most $2$. These results
give a natural monoid analogue of Lyndon's Identity Theorem for one-relator
groups.
