I had: src="/main.js" And it has to be: src="./main.js" TheFix= add dot before the file name ./file.js