No more than on the ground, it simply poses a different set of challenges. On the ground the ship must be supported since its shape doesn't lend itself to being very strong, even while fully constructed. There's also a danger of workers and tools falling, and inclimate weather destroying the ship before work can be completed.
Space is a hostile environment, and one in which people don't work well even in the best of conditions.
Space would suck without a spacesuit or shuttle of some kind, but since they'd have those...
Do we build submarines and other warships in the water?
Ah yes, this kernel of logic.

Let's see, in water there are currents, the water itself has a higher density than air, making it more difficult to move objects through it, and the water itself has an oxidizing effect on metal. We also don't have to launch ships or submarines into space, and launching them is just as easy as sliding them into the water that is directly adjacent to where they are built. In space, there is no resistance to movement from any fluid, there is no oxidizing agent, and it would probably be pretty awkward to launch a fully constructed starship from the ground when it'd be much easier to just do it in space.
Do we build space shuttles and space station components in orbit?
No, but we're building a space station in orbit.
Of course not. It would make the task 1000x harder than it needs to be.
We also have no infrastructure present in orbit that would be needed to build a ship in orbit, we just have the cranes on the space shuttle and the space station, which are kind of busy trying to finish up the space station.
I have no problem with having the major components assembled and finalized in space, but it makes a lot more sense to do most of the work in man's natural environment.
You could do that, because it'd be easier to get those into orbit from the ground. On the other hand, if you had a giant ... spacedock ... that you could seal off from space and pressurize ... you could even build the components in space too.
Star Trek definitely had its sciency elements, sure, but there was far too much handwavium and unobtanium for me to consider it "hard".
So building the same ship with all the same handwavium and unobtanium on the ground instead of in space would make it more "hard"?