# Using npm module

**URL:** <https://discourse.nodered.org/t/using-npm-module/81977>\
**Category:** General\
**Created:** [12 October 2023 16:49 UTC](https://discourse.nodered.org/t/using-npm-module/81977 "2023-10-12T16:49:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [12 October 2023 17:00 UTC](https://discourse.nodered.org/t/using-npm-module/81977/2 "2023-10-12T17:00:55Z")

</div>

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](https://flows.nodered.org)

If not, it may still be possible, but its going to require some setup.

1. Ensure your installation allows to use 3rd party modules in **Function** nodes.  
You do this by enabling a setting in **settings.js** line 455.

1. Restart Node RED

2. In a **function** node declare its use under **setup**  
 ![Screenshot 2023-10-12 at 17.59.46](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/19dcb70a813d9fba375c81113b84605619aede77.png)

3. Then the various code blocks in the **function** node will now be able to use its exports  
`astronomyEngine.something`

---

_[View the full topic](https://discourse.nodered.org/t/using-npm-module/81977)._
