ReferenceError: SunCalc is not defined

How did you use it in your function node?

Note: https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506