> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/troubleshooting/node-hasnt-been-executed.md).

# Fix the Duaer expression error "Node hasn't been executed"

Duaer raises Node 'X' hasn't been executed when an expression references a node that did not run this time, usually after an If or Switch branch.
## Why it happens

In Duaer, {{ $("Find customer").item.json.name }} reads what Find customer output in this run. When that node sits on an [If](/build/if.md) branch that did not run, or runs after the current node, there is nothing to read, so Duaer raises Node 'Find customer' hasn't been executed.

It also shows up when you test one node in the editor before earlier nodes ran. Select Execute previous nodes first.

## Three fixes

1. Rewire: put the referenced node earlier on the same path as the current node.
2. Join branches with [Merge](/build/merge.md) and reference the Merge output rather than a node inside one branch.
3. Guard when it may not run: {{ $if($("Find customer").isExecuted, $("Find customer").item.json.name, "") }} returns an empty string when it did not.
## Questions

### What is isExecuted in Duaer?

In a Duaer expression, $("Node name").isExecuted tells whether that node ran this time. Pair it with $if to avoid the error.

### The node did run, but Duaer still raises the error?

Check that the node name matches exactly. Duaer is case and space sensitive, and old expressions may keep a renamed node's old name.

## Related

- [Transform data with expressions in Duaer](https://doc.duaer.com/code/expressions.md)
- [Branch with If in Duaer](https://doc.duaer.com/build/if.md)
- [Route items with Switch in Duaer](https://doc.duaer.com/build/switch.md)
- [Configure the Merge node in Duaer](https://doc.duaer.com/build/merge.md)

