Let $M,N$ be $d$-dimensional oriented Riemannian manifolds, and let $f:M \to N$ be smooth. Assume $M$ is compact with boundary.
Does there exist a vector field $X \in \Gamma(TM)$ s.t $\text{div} \, X=\det df$?
If $M$ has no boundary this is impossible in general since $$ \int_M \det df \, dV=\int_M \text{div} \, X \, dV=\int_{\partial M} \langle X ,n \rangle \, dV=0.$$
Such a vector field always exists in the Euclidean case, when $M=N=\mathbb{R}^n$, see e.g theorem 8.33 in "Direct methods in the calculus of variations" - by Dacorogna (second edition).