Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'querySelector')

Product: PDF.JS Express Viewer

Product Version: 8.7.0

Please give a brief summary of your issue: Angular build throwing querySelector Error in console

Please describe your issue and provide steps to reproduce it:
I’m running the Angular Sample build and I’m getting the following error in the console:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘querySelector’)

Please provide a link to a minimal sample where the issue is reproducible: Just download the Angular Sample build from GitHub - pdfjs-express/pdfjs-express-viewer-angular-sample , which is the URL provided in the docs. Run npm install and npm start.

Hi Alex,

Thank you for contacting us.

We’re currently looking into the issue and will update you the progress if we have more details.

Hello AlexA,

We have a post here on the PDFJS Express community forum with a build that fixes this issue: Express Viewer Pan does not work: "undefined (reading 'querySelector')" -> #pageWidgetContainer - #9 by tgordon - Technical Support - PDF.js Express

Let me know if this works for you!

Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron