2

I have a Javascript class, written in Puppetteer, which works fine if executed as a standalone.

I'm trying to execute the script class from my Java class. For that i'm using the apigee-trireme library (running node.js scripts inside Java)

But when I try to execute the script, I'm getting an error from the puppeteer class as, 'missing formal parameter'. Not sure whether its because of the generated function header in puppeteer, find code below,

(function (exports, require, module, __filename, __dirname){//runtime generated by puppeteer
  'use strict';
  const puppeteer = require('puppeteer');
  (async() => { - error line
  //logic - here
})();
}); //runtime generated by puppeteer

Could you help/advise me? I'm really stuck at the moment.

Diya
  • 43
  • 10

0 Answers0