@mesqueeb This is the same error you were stuck on right?
You see whats weird about this is that fluent routing wasn't introduced until 5.4 so i'm pretty sure you couldn't define a prefix() method in previous versions.
If i'm correct then for some reason, 5.4 features are being pulled in.
You could change the RouteServiceProvider and remove the prefix method and just define the prefix as you usually would on a route group and see if that works.
Route::group(['prefix' => 'api'], function () {
// require routes.
});