I am searching for counterexamples to show that $\operatorname{Hom}_R(\prod_i M_i,N)$ may not be isomorphic to $\prod_i \operatorname{Hom}_R(M_i,N)$ or $\bigoplus_i\operatorname{Hom}_R(M_i,N)$ as $\mathbb Z$- modules when $R$ is a ring, and $M_i$ and $N$ are $R$-modules.
I chose $\mathbb Q$ or $\mathbb Z_n$ for $M_i$ and $N$ alternatively, and used some facts about injectiveness of $\mathbb Q$ but could not arrive at any good results. Thanks in advance!