Sounds like you're trying to build one of the predefined ship. This is a bad idea mainly because the predefined ships are not really all that useful.
Your problem is that besides needing the particular weapons and defense tech required by the predefined ships you also need to have the correct engine tech, life support and of course hull. Also there can be certain levels of miniaturization that you need for the predefined componenets to actually fit on the hull. If you're missing any one tech then you can't build that particular ship.
Most folks really don't bother with the predefined ships and simply build their own. It's not particularly difficult and if you don't really care what the ship looks like you can use the "place" button to place the components.
When you build your own ships then you can use the latest techs that you have and always be assured that you put out the best ship that you can instead of being unable to build a ship simply because you don't have the proper level of range or sensors or some other non critical component.