Does it violate the assumptions of linear regression to perform it on time series data?
You are correct when you say that there might be autocorrelation in the error terms when some observation in time $t$ is contingent on $t-1$. Find a rigorous discussion of the problem here.
Usually a solution to cope with this problem is to include additional variables to &quot;control for&quot; autocorrelation. This usually means adding lagged $y$-variables (which are called autoregressive variables or $AR(t)$). So you could simply add a lagged variable $y_{t-1}$ to your model, which reads like &quot;todays $y$ is (among other things) explained by yesterdays $y$&quot;.
Say you have a model which is contingent on time (omitting $i$ for convenience):
$$y_t = \beta X_t + u_t.$$
You can add an autoregressive term like:
$$y_t = \beta X_t + \gamma y_{t-1} + u_t.$$
For a detailled discussion including testing procedures, please refer to the link above.