Recently, one of our clients started to get $.widget is not a function JS error on their Magento 2 store and as a result, customers weren’t able to complete their checkout.
The error was present on Minicart, Product view page, and Checkout page and even changing to default Magento 2 template did not fix the issue. Eventually, I found that the issue was with Magento JS merging and I was able to fix the issue by making the following changes:
In Backend go to:
Deploy the static files
Clear cache under
System -> Cache Management
Additional Cache Managementregion choose the Button
Flush Magento Cacheafterwards
Now clear Cache in Browser and reload. Everything should be back to normal now.