Are you sure that "node_name" is the correct path to the node, either an absolute path, or a path relative to the node to which the script is attached?
Also, the node must be in the scene tree . I.e., if that code is in node A and references node B, then B must be in the scene tree when A's ready() is called by the engine. Normally that means that B must be a descendant of A.
I prefer using the $ syntax, but haven't had any problems with it. For example:
onready var gui_pause_button: Node = $Game/GUI/PauseButton