Welcome to the forums @Greg50100,
It may be worth searching for a Node that has already wrapped this in a Node RED Node, search here : https://flows.nodered.org
If not, it may still be possible, but its going to require some setup.
-
Ensure your installation allows to use 3rd party modules in Function nodes.
You do this by enabling a setting in settings.js line 455.functionExternalModules: true,
settings.js is usually in your Node Red user directory (example /home/pi/.node-red/settings.js)
-
Restart Node RED
-
In a function node declare its use under setup
-
Then the various code blocks in the function node will now be able to use its exports
astronomyEngine.something