I had the same error, but it was caused by a not machting case. I wrote in my HTML file:
But the actual filename was MYSCRIPT.js
. I didn't noticed that, because when I open the HTML file locally, browsers seem to ignore this and import even files where the cases not match.