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
});
}