0

Attached is an error I get when I attempt to run a jenkins job that runs a nightwatch script. It appears to have an issue with a function within the node modules.

Desired behavior is for the job in jenkins to run successfully. The issue isn't with the code that I wrote. This works locally. It is an issue between node and Jenkins.

aws/workspace/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS/lib/node_modules/nightwatch/lib/utils/periodic-promise.js:39

async runAction({prevResult, prevQueuePromise}) {
        ^^^^^^^^^

SyntaxError: Unexpected identifier

Here is the node module code...

async runAction({prevResult, prevQueuePromise}) {
    if (!this.queue.length) {
      return null;
    }

    const queuePromise = this.queue.shift();
    const deferred = createPromise();

    try {
      const result = await this.perform(queuePromise, {prevResult, prevQueuePromise}, deferred);

      if (this.queue.length) {
        return await this.runAction({
          prevResult: result,
          prevQueuePromise: queuePromise
        });
      }
CMacMcMac
  • 1
  • 1
  • I don't know why this got closed. It includes everything necessary. – CMacMcMac Jan 17 '20 at 17:02
  • No it doesn't. How are we supposed to recreate this error? I have no idea of your jenkins setup, nor do I know what the encompassing code is. If you could provide a sample that reproduces the error with the minimal amount of code we can help you. https://stackoverflow.com/help/minimal-reproducible-example – Tschallacka Jan 17 '20 at 17:03
  • Then your question is not a proper fit for Stack Overflow. Without a minimal reproducible example this code is not a good fit for Stack Overflow. See the close reason. This question will therefore not be a good help to anyone else looking for a solution, because it lacks the essential parts to reproduce this and so to be able to deduce if it's the same issue as their system has. Take a look at all the different settings between local and remote, and see what's different – Tschallacka Jan 17 '20 at 17:24

0 Answers0