# Problem with functionExternalModules

**URL:** https://discourse.nodered.org/t/problem-with-functionexternalmodules/45430
**Category:** General
**Created:** [10 May 2021 15:17 UTC](https://discourse.nodered.org/t/problem-with-functionexternalmodules/45430 "2021-05-10T15:17:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jukow](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jukow](https://discourse.nodered.org/u/jukow)
#### Post date: [10 May 2021 15:17 UTC](https://discourse.nodered.org/t/problem-with-functionexternalmodules/45430/1 "2021-05-10T15:17:19Z")

</div>

I want to use the new node-red v1.3 function for loading modules into function nodes. I installed string-similarity via npm and it shows up in node-red:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/f/6f8f6742db4cb13dbb61a0a4d684508371b3aa2f.png)  
I restarted node-red and got an error message on the console:

```auto
10 May 16:50:02 - [error] [function:58f3bc8.6a90344] Fehler beim Laden des Moduls : Error: Module not allowed
10 May 16:50:02 - [error] [function:58f3bc8.6a90344] Error: Function node failed to load external modules

```

Any ideas?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [10 May 2021 15:41 UTC](https://discourse.nodered.org/t/problem-with-functionexternalmodules/45430/2 "2021-05-10T15:41:36Z")

</div>

Have you done anything with the `externalModules` setting?

The error (module not allowed) is triggered if the runtime thinks the module you've tried to use is on one of the Deny-Lists under `externalModules`. But if you haven't done anything with the `externalModules` setting, then it should work...

---

<div class="post-metadata">

### Author: ![jukow](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jukow](https://discourse.nodered.org/u/jukow)
#### Post date: [10 May 2021 15:47 UTC](https://discourse.nodered.org/t/problem-with-functionexternalmodules/45430/3 "2021-05-10T15:47:51Z")

</div>

I have not touched `externalModules` settings at all.

Is it right that the module is installed both in ./externalModules and ./node\_modules?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 May 2021 16:05 UTC](https://discourse.nodered.org/t/problem-with-functionexternalmodules/45430/4 "2021-05-10T16:05:10Z")

</div>

> [@jukow](#):
>
> Is it right that the module is installed both in ./externalModules and ./node\_modules?

If it is in ./node\_modules that suggests you manually installed it yourself. Node red will automatically install it in ./externalModules/node\_modules for you.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [10 May 2021 16:33 UTC](https://discourse.nodered.org/t/problem-with-functionexternalmodules/45430/5 "2021-05-10T16:33:25Z")

</div>

> [@jukow](#):
>
> Is it right that the module is installed both in ./externalModules and ./node\_modules?

As Colin says, currently NR will install those modules under the externalModules directory and expect to use it from there.

I wonder if there's an issue if the module exists in both places...

Could you raise an issue? [GitHub - node-red/node-red: Low-code programming for event-driven applications](https://github.com/node-red/node-red)

---

<div class="post-metadata">

### Author: ![jukow](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jukow](https://discourse.nodered.org/u/jukow)
#### Post date: [10 May 2021 18:16 UTC](https://discourse.nodered.org/t/problem-with-functionexternalmodules/45430/6 "2021-05-10T18:16:58Z")

</div>

I solved my problem now.

First i did a fresh node-red install. Problem persisted regardless of the module i picked.  
Then i updated my nodejs version from 8.x to 14.x and it worked straight away.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [24 May 2021 18:17 UTC](https://discourse.nodered.org/t/problem-with-functionexternalmodules/45430/7 "2021-05-24T18:17:54Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
