The Angular Universal (SSR) cannot integrate with the external libraries like puppeteer, bulljs

Viewed 253

This is just for describing the issue and sharing my solution, I got stuck a lot of time on it.

This issue happened after I upgraded the Angular 10 -> 11 and changed the builder from udk:udk-runner to @angular-devkit

The issue I was facing is when I set the field bundleDependencies in angular.json to true . The Puppeteer cannot start with the error cannot launch the browser

enter image description here

Then I found it also happened on the other external libraries I'm using at the Server side like BullJS Bull-Board Puppeteer-Cluster with the below error

enter image description here

Github source for demo the issue: https://github.com/phattranky/angular-ssr-error-with-pupepteer

1 Answers
Related