As Igor Belegradek showed in the comments, one could find an example by finding a CW-complex $X$ and a map $X \to BO(n)$ which is not nullhomotopic, but where the restriction to every finite subcomplex is nullhomotopic. Such a map is called a phantom map. The question "is this map nullhomotopic?" has the same answer whether or not we are asking our maps to preserve the basepoint, and so I will take some steps that are casual about basepoints.

For our example, we're going to take $n = 3$ and $X = \Sigma \mathbb{CP}^\infty$, the suspension of $\mathbb{CP}^\infty$. This is a CW-complex whose finite subcomplexes are $\Sigma \mathbb{CP}^n$.

These spaces are simply connected, so $[\Sigma \mathbb{CP}^n, BO(3)] = [\Sigma \mathbb{CP}^n, BSO(3)]$ for all $n \leq \infty$.

Then $[\Sigma \mathbb{CP}^n,BSO(3)] = [\mathbb{CP}^n, SO(3)]$ for all $n \leq \infty$ by the loop-suspension adjunction. ("A vector bundle on a suspension is determined by a clutching function.")

We can also identify $SO(3)$ with $\mathbb{RP}^3$, which has $S^3$ as a double cover. Again because $\mathbb{CP}^n$ is simply connected, $[\mathbb{CP}^n,SO(3)] = [\mathbb{CP}^n, S^3]$ for all $n \leq \infty$.

One of the famous examples of phantom maps is a map constructed by Brayton Gray: a map $\mathbb{CP}^\infty \to S^3$ which is not nullhomotopic, but where the restriction to $\mathbb{CP}^n$ is nullhomotopic for any $n$. (I believe that this is in his paper "Spaces of the same $n$-type, for all $n$", and that a proof can be given using Milnor's $\lim^1$ sequence.) Pushing this back, we get a vector bundle on $\Sigma \mathbb{CP}^\infty$ whose restriction to any finite subcomplex is trivial.

long lineis a locally compact space (not metrizable though), whose tangent bundle is not trivial (whereas it is trivial over the closed subintervals). $\endgroup$ – Chris Gerig Aug 18 '13 at 2:33