Localization does not commute canonically with infinite direct products 
Let $S=\mathbb{Z}-\{0\}$. Show the existence or nonexistence of isomorphism between $S^{-1}\prod_{1}^{\infty}\mathbb{Z}_{i}$ and $\prod_{1}^{\infty}\mathbb{Q}_{i}$ as $\mathbb{Q}$-vector spaces. (Here $\mathbb Z_i=\mathbb Z$ and $\mathbb Q_i=\mathbb Q$ for all $i\ge 1$.)

This is an example used to show that the localization does not commute with infinite products under the natural (canonical) homomorphism. I read this from a lecture note by Ravi Vakil. I think we still need to show these two are really not isomorphic as $\mathbb{Q}$-vector spaces. I tried to follow the hint to consider the element $(1,\frac{1}{2},\frac{1}{3},...,\frac{1}{n},...)$ but failed.
To user26857: I want a proof of the existence or nonexistence of isomorphism between these two vector spaces. If I get it right, your solution reduced the problem to the existence of basis of these two vector spaces. And in your sense, a basis  is a subset $B$ (of the vector space $V$) such that every finite subset of $B$ is a linearly independent set and any vector in $V$ can be expressed as a finite sum of the elements in $B$. If this is what you mean, can you show the existence of such basis? Thank you! 
To Ragib Zaman: Your example is a better one. Thanks! 
 A: They are isomorphic as $\mathbb Q$-vector spaces, but not canonically. 
Let $B\subset\mathbb Q^{\mathbb N}$ a $\mathbb Q$-basis. Then $|\mathbb Q^{\mathbb N}|=|B||\mathbb Q|$. On the other side, we have $\mathbb Z^{\mathbb N}\subset S^{-1}\mathbb Z^{\mathbb N}\subset\mathbb Q^{\mathbb N}$, so $|\mathbb Z^{\mathbb N}|\le |S^{-1}\mathbb Z^{\mathbb N}|\le|\mathbb Q^{\mathbb N}|$. Since $|\mathbb Z^{\mathbb N}|=|\mathbb Q^{\mathbb N}|$ we get $|S^{-1}\mathbb Z^{\mathbb N}|=|\mathbb Q^{\mathbb N}|$. If $B'\subset S^{-1}\mathbb Z^{\mathbb N}$ is a $\mathbb Q$-basis we have $|S^{-1}\mathbb Z^{\mathbb N}|=|B'||\mathbb Q|$, and therefore $|B|=|B'|$, so $\mathbb Q^{\mathbb N}$ is isomorphic to $S^{-1}\mathbb Z^{\mathbb N}$ as $\mathbb Q$-vector spaces.
The canonical morphism sends $(k_n)_{n\ge 1}/s$ to $(k_n/s)_{n\ge 1}$. If there is such an element which is sent to $(1/n)_{n\ge 1}$, then $k_n/s=1/n$ for all $n\ge 1$, that is, $nk_n=s$ for all $n\ge 1$ (or, if you like, $n\mid s$ for all $n\ge 1$), a contradiction. Thus the canonical morphism is (injective but) not surjective. 
A: Ravi's hint is to show that $(1 \ , \ 1/2 \ , \ 1/3 \ , \ \ldots)$ is not in the image of the natural map, so the natural map is not an isomorphism. As user26857 shows though, in this example the vector spaces are actually isomorphic, but not canonically. 
It may be more satisfying to see the following example:
Take out ring to be $R=\mathbb{Z},$ $S = \mathbb{Z}\setminus \{ 0\}$ and the modules to be $M_i = \mathbb{Z}/(i) \ , \ i\geq 2.$ Then $S^{-1}M_i=0$ since for all $x\in M_i$ and $s\in S$ we have $$ \frac{x}{s} = \frac{ix}{is} = \frac{0}{is} = \frac01.$$
On the other hand, $S^{-1}\left(\prod_{i\ge2}M_i\right)$ is non-zero. To see this, note that if $\dfrac{(1,1,1,\ldots)}{1} =\dfrac01$ then there exists $s\in S$ such that $s(1,1,1,\ldots)=0.$ But this would mean that every integer $i\geq 2$ divides $s,$ and $s$ must be non-zero so this is impossible. 
So we have found an example where localization does not commute with an infinite direct product through any map, not just the natural map. 
