For me the solution was very simple, a new JS module file I had added was not found as @Klaassiek points out. Republishing the server fixed this problem. In another case there was a typo in the file path.