Problem with functionExternalModules

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:


I restarted node-red and got an error message on the console:

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?

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...

I have not touched externalModules settings at all.

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.

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

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.

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