Adding a local JavaScript libraries to JavaScript node


i want to add a local JavaScript library to the Generic JavaScript node.
I can load it with require.config from the web.

paths: {
“lib1”: “”,
“lib2”: “
require([“lib1”, “lib2”,], function(lib1, lib2) {

How to load it from a local path?



I think there is two things you can try. You can either read in the library and convert it to a string flow variable which you then can feed into the node, or you can use the file:// protocol to load it from disk directly. If you want to package the library with the workflow or your local repository you can put it inside the directory of the workflow (or repository) and then append the path to the knime.workspace flow variable to get the correct file url at runtime.

1 Like

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