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
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
Github source for demo the issue: https://github.com/phattranky/angular-ssr-error-with-pupepteer