Angular Project builds locally but fails through action

I have a NRWL monorepo with an angular application inside. This project is a large scaled application and build’s fine locally for all the developers. We wanted to build and test this application using github actions, but the build fails.

The build script being run is the exact same that is ran locally which succeeds with no issues.

My question is. What is the difference in how a github action builds an angular application than that of a local build?

The error is displayed above. I know what the error is, it is related to Angular 11 not using webpack 5 and being able to chain local modules not node_modules which pdfjs exists in. But this error is only shown during github action build even though the workaround to integrate webpack 5 in angular cli is done in the package.json using the top level property “resolutions”