Assume $f$ exists. By the chain rule, we'd have $$ f'(z)e^{f(z)}=1 $$ so $$ f'(z)=\frac{1}{e^{f(z)}}=\frac{1}{z} $$ Let $\gamma$ be the unit circle: $\gamma(t)=e^{it}$, for $t\in[0,2\pi]$. Then $$ 0=\int_\gamma f'(z)\,dz=\int_\gamma\frac{1}{z}\,dz =\int_0^{2\pi}\frac{1}{e^{it}}ie^{it}\,dt=2\pi i $$ a clear contradiction.


Here's another proof: Write $f=u+iv.$ Then

$$\ln |z| = \ln |e^{f(z)}| = \ln e^{u(z)} = u(z), \,z\ne 0.$$

Let $\log z$ denote the principal value logarithm in $U=\mathbb C \setminus (-\infty,0].$ Then we have $\text { Re }(f(z) - \log z) \equiv 0$ in $U.$ But an analytic function in $U$ that is purely imaginary is constant. Thus $f(z) - \log z$ is constant in $U,$ which implies $f(z)$ has discontinuities along $(-\infty,0],$ contradicition.