A grasshopper jumps either $364$ or $715$ units on the real number line. If it starts from the point $0$, what is the smallest distance that the grasshoper can be away from the point $2010$?

$ \textbf{(A)}\ 5
\qquad\textbf{(B)}\ 8
\qquad\textbf{(C)}\ 18
\qquad\textbf{(D)}\ 34
\qquad\textbf{(E)}\ 164
$
To solve this problem, we need to determine the smallest distance the grasshopper can be from the point \(2010\) on the real number line, given that it can jump either \(364\) or \(715\) units at a time.

1. **Understanding the Problem:**
   The grasshopper starts at \(0\) and can jump either \(364\) or \(715\) units. We need to find the smallest distance from \(2010\) that the grasshopper can reach.

2. **Formulating the Problem:**
   Let \(x\) be the number of \(364\)-unit jumps and \(y\) be the number of \(715\)-unit jumps. The position of the grasshopper after \(x\) and \(y\) jumps is given by:
   \[
   364x + 715y
   \]
   We need to find the smallest distance from \(2010\), i.e., we need to minimize:
   \[
   |2010 - (364x + 715y)|
   \]

3. **Finding the Greatest Common Divisor (GCD):**
   To determine the possible values of \(364x + 715y\), we need to find the GCD of \(364\) and \(715\). Using the Euclidean algorithm:
   \[
   \gcd(715, 364) = \gcd(715 - 364 \times 1, 364) = \gcd(351, 364)
   \]
   \[
   \gcd(364, 351) = \gcd(364 - 351 \times 1, 351) = \gcd(13, 351)
   \]
   \[
   \gcd(351, 13) = \gcd(351 - 13 \times 27, 13) = \gcd(0, 13) = 13
   \]
   Therefore, the GCD of \(364\) and \(715\) is \(13\).

4. **Expressing the Problem in Terms of the GCD:**
   Since the GCD is \(13\), any linear combination \(364x + 715y\) must be a multiple of \(13\). Thus, we need to find the smallest distance from \(2010\) to the nearest multiple of \(13\).

5. **Finding the Nearest Multiple of 13 to 2010:**
   We divide \(2010\) by \(13\) to find the nearest multiple:
   \[
   2010 \div 13 \approx 154.615
   \]
   The nearest integers are \(154\) and \(155\). Calculating the corresponding multiples:
   \[
   13 \times 154 = 2002
   \]
   \[
   13 \times 155 = 2015
   \]

6. **Calculating the Distances:**
   The distances from \(2010\) to these multiples are:
   \[
   |2010 - 2002| = 8
   \]
   \[
   |2010 - 2015| = 5
   \]

7. **Conclusion:**
   The smallest distance the grasshopper can be from \(2010\) is \(5\).

The final answer is \(\boxed{5}\).