# Problem loading an external module

**URL:** <https://discourse.nodered.org/t/problem-loading-an-external-module/83143>\
**Category:** General\
**Created:** [24 November 2023 06:14 UTC](https://discourse.nodered.org/t/problem-loading-an-external-module/83143 "2023-11-24T06:14:15Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [24 November 2023 21:15 UTC](https://discourse.nodered.org/t/problem-loading-an-external-module/83143/12 "2023-11-24T21:15:50Z")

</div>

I could have an explanation for what you see:

> <https://github.com/node-red/node-red/blob/a55554193bac2ee4997948c6a15dd752844cace4/packages/node_modules/%40node-red/nodes/core/function/10-function.js#L316-L323>

After the function node imported an _ExternalModule_ as `lib`, it references (line 318) `lib.default` to the variable name defined on the property editor.

`lib.default` yet is only present if the module has defined an `export default` or `export { ..., ... as default, ...}`.

`javascript-interface-library` doesn't define an `export default`, but _only_ `export { ... }`.

Is this a bug of Node-RED? I'm not sure...

---

_[View the full topic](https://discourse.nodered.org/t/problem-loading-an-external-module/83143)._
