0👍
It seems like that module is a node module and you should be able to import it using require, like this:
const getPageCount = require('docx-pdf-pagecount');
From what I briefly saw in the library’s code, this is a module that is meant to be used in the BE and won’t work in the FE (Browser).
Source:stackexchange.com