'Problem with page js paginating html data

I have an app developed with ejs and express that renders in the browser a page with data that I've obtained from the DB. The res.render do this job and works fine, but I need to paginate this content in the browser. For this job I am using Paged.js library as is shown in the following code:

const  {Previewer} = require('pagedjs');
const renderView = (ruta, data) =>
res.render(ruta, {
  data,
});

let paged = new Previewer();
return res.render("index", {
  dataToRender,
  utils,
});

But the fragment let paged = new Previewer(); fails with the following error: ReferenceError: requestAnimationFrame is not defined. I've not found anyone with this problem using this library as far as I've searched. What could be the cause of the problem?

Thank you very much in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source