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