All pages importing node packages suddenly stopped working!

Hi, I am getting the above same error that occurred in our site last night. The bug is that all pages in which node packages have been imported has suddenly stopped working. I started getting problems last night after publishing the site without any changes. However, when restored to a last published backup. which was couple days old, it started working fine. After looking into it, I checked that If I remove the imports of modules, it starts working. I have also attached a screenshot of the error in browser console, please refer
that.
Thanks