# Importing function from Node.js module

**URL:** <https://discourse.nodered.org/t/importing-function-from-node-js-module/77741>\
**Category:** General\
**Tags:** function-node\
**Created:** [20 April 2023 12:54 UTC](https://discourse.nodered.org/t/importing-function-from-node-js-module/77741 "2023-04-20T12:54:36Z")\
**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:** [20 April 2023 13:11 UTC](https://discourse.nodered.org/t/importing-function-from-node-js-module/77741/2 "2023-04-20T13:11:19Z")

</div>

Welcome to forums @dazfitzg.

You cant `require` or `import` in function nodes.

Please see a recent post on how to do it [Here](https://discourse.nodered.org/t/howto-use-assert/77718)

EDIT:  
Seems you have already tried that 🤦‍♂️

> I removed the import and tried to add the module in the function node's setup tab.

---

_[View the full topic](https://discourse.nodered.org/t/importing-function-from-node-js-module/77741)._
