perry icon indicating copy to clipboard operation
perry copied to clipboard

Perry options error value

Open dekathomas opened this issue 3 years ago • 0 comments

I try to use perry js in a new HTML file and I get some error. This is my first time to use perry js. I import perry js from this link https://perry-js.netlify.com/bundle.js.

All links and javascript code I got from copy it from the perry js README.md.

This is the error message I receive

Error: [Perry Options]: "plugins" was supposed to be of type "array", but received "function ConsoleLogPlugin(reportInfo) { console.log('[Perry Report Info]:', reportInfo); }"

This is the full code of the javascript

function ConsoleLogPlugin(reportInfo) {
  console.log('[Perry Report Info]:', reportInfo);
}

const perry = new window.Perry({
  /* Enables log recording */
  log: true,
  /* Enables click recording */
  clicks: true,
  /* Enables screen recording */
  enableScreenRecording: true,
  /* Plugins are ways to handle the bug reporting submission */
  plugins: [ConsoleLogPlugin]
});

(async () => {
  await perry.render();
})();

Could anyone help me to solve this problem?

dekathomas avatar Jun 05 '21 15:06 dekathomas