Find the largest open editor window, split it and set its type
Your code is working as expected as it is setting the type of the context area, which is where the button is, or the text editor if run from there, or the py console if run from there etc.

You could fix by overriding the wm.context_set_string operator.

However it's prob much easier to find the other area with maximimum area.

import bpy
from bpy.types import Operator
from operator import itemgetter

class OpenNodeEditor(Operator):
    """Open the node editor"""
    bl_idname = "screen.open_node_editor"
    bl_label = "Open Node Editor"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        screen = context.screen
        areas = [(area, area.width * area.height) for area in screen.areas
                  if area != context.area]
        if len(areas):
            maxarea, a = max(areas, key=itemgetter(1))
            maxarea.type = 'NODE_EDITOR'
        else:
            #split areas
            direction = 'HORIZONTAL' if context.area.width &lt; context.area.height else 'VERTICAL'
            bpy.ops.screen.area_split(direction=direction)
            screen.areas[-1].type = 'NODE_EDITOR'

        return {'FINISHED'}


Also note: your operator above is the equiv of

row = layout.row() # some layout
op = row.operator("wm.context_set_string")
op.data_path = "area.type"
op.value = 'NODE_EDITOR'