Hi! Was that error with "space-trains-charger" ? It seems this mod tries to enable fast-replace for all electric turrets, not considering compatibility. It has thrown errors with https://mods.factorio.com/mod/Kux-OrbitalIonCannon mod too, and possibly with other mods, adding electric/laser turrets.
I don't see easy way to repair it in this mod - it would be better to solve this in 5Dim's mods.
Until then you can just disable Charger station in Space Trains startup settings (if you are not using it of course), it seems to help.