Use global variables with yarn nodes

Here’s a solution in a thread from a while back. I doubt Yarn has changed much, so it should still work