I think of "nearby" as an adverb and "near" as a preposition. (Both can be adjectives: She lives in a nearby neighborhood. " I'd be inclined to view your number 2 as incorrect, but I could be wrong.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.