When I came across this error message today, it was because browser-sync was returning a 404 page to the browser: my javascript file was not in the same directory that the HTML expected.