Hi,
I would also not recommend doing it that way. It makes the workflow almost impossible to debug when it is running somewhere else than the KNIME Server. I have attached a workflow that downloads the library code first and then passes it as a flow variable into the Generic JS View. You have to hack around with module.exports a bit, but it works. I would suggest you add some caching for the library so it is not retrieved every time you run the workflow. You can use a table writer to write the output of the Binary Object to String node into a table file and then when the workflow runs check if that file exists and load from there. If it does not exist, you use the logic I put in the workflow. You can use a List Files in conjunction with a Empty Table Switch to have those two branches.
Kind regards,
Alexander
mermaid.knwf (388.9 KB)