In the book "Principles of algebraic geometry" by Griffiths and Harris (PG. 237) there is a proof of the following statement:
"Let $f:M \rightarrow N$ be a holomorphic map between two compact connected complex manifolds of the same dimension, if $f$ is nowhere singular, i.e. the determinant $|J(f)| \not\equiv 0$, then $f$ is surjective."
The book proposes a proof without the use of the "proper mapping theorem".
Consider the volume form $\psi_N$ on $N$. Since $|J(f)|$ is not identically zero and since $f$ preserve the orientation, we have $$ \int_M f^*\psi_N >0.$$ Since for any $q \in N$ we have $H^{2n}(N \backslash \{q\}, \mathbb{R}) = 0$, the volume form is exact $$ \psi_N = d \eta$$ for some $(2n -1)$- form $\eta$ on $N \backslash \{q\}$. But if $q \not\in f(M)$ we have $$ \int_M f^*\psi_N = \int_{\partial M} df^* \eta = 0,$$ which is a contradiction. This is the end of the proposed proof.
Clearly there is a mistake at the end, indeed the equation is
$$ \int_M f^*\psi_N = \int_{M} df^* \eta.$$
My question is: why the integral $\int_{M} df^* \eta = 0$?
If we apply the Stokes' theorem to the last equation it would be $$\int_M f^*\psi_N = \int_{M} df^* \eta = \int_{\partial M} f^* \eta$$ but still I don't see how this is $0$.
As noted by Moishe Kohan in the comments: As $M$ is a compact manifold, $\partial M = \emptyset$ and so $\int_{\partial M} f^* \eta = 0$.