This error occurs when defining attached libraries to custom controllers. Make sure that instead of writing
'#attached' => [
'library' => ['timeline.global']
]
You change the dot to a slash
'#attached' => [
'library' => ['timeline/global']
]