Critical dependency: required function... dependencies cannot be statically extracted

Critical dependency: required function… dependencies cannot be statically extracted

Site name:
Custom domain: n/a
Build config:
Build log:

Our (nextcert-renderer) Github master branch cannot be deployed to Netlify using Continuous Integration (CI) because the build fails. This does not appear to be a code issue. We can build locally and deploy manually to Netlify and the application works fine. But when we try CI, there are multiple errors in the log and the build fails. It was working up until 6-8 weeks ago.

I attached the full log and the build config file. The problem seems to originate here: “Critical dependency: require function is used in a way in which dependencies cannot be statically extracted Netlify issue.” If you look at the adjoining error log entries, there is some dependency on “./node_modules/pdfjs-dist/build/pdf.js” which we are not using. Various online posts regarding this error indicate some problem in the loading of dependency libraries. Perhaps there is something misconfigured in JSON config file.

Do you have any idea how we might resolve this?

hi there,

I think you are bumping into the issue we described & addressed here:

there are some fixes outlined in that thread that should get you back on the road. Let me know if you need more assistance!