Purists tend to write the term with a space (narrow boat) when referring to an original (working) boat or a replica, omitting the space when referring to modern canal boats of around beam and used for leisure including residence.
It is also incorrect (or at least incongruous) to refer to a narrowboat as a longboat, although this name was sometimes used in the Midlands in working-boat days.