Had a similar issue, tried many solutions, tried replacing whole project folder from the working backup I had, nothing fixed, finally I just hit ctrl+F5 on chrome and the error was gone, It was a browser cache issue