Nodejs plugin breaks node's require() mechanism

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Minor
    • Component/s: nodejs-plugin
    • None
    • Environment:
      Any

      Executing code entered direclty into the text fields runs like a charm. This procedure works fine for small adhoc snippets, but has its limitations in an enterprise strength setup. Sooner or later one might want to keep the code under SCM control and only use a 'run' stub to execute.

      A workspace local, node module compliant directory 'node_modules' is not taken into account when require()ing modules, because the script is executed in /tmp using a unique ID as filename.

      Copying the local node_modules folder to /tmp resolves the issue, but this is a rather clumsy workaround because (a) you have to remember to remove it afterwards, and (b) what if two jobs need different node_module folder.

      Is it a viable option to have a '[x] Stay local' option for scripts that require require()?

            Assignee:
            Nikolas Falco
            Reporter:
            Jochen Hinrichsen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: