The program must be hosted by the http server.
In the program directory, run command:
> Skip first if the requirement is already satisfied.
npm install http-server
npm run start
In the program directory, run command:
python3 -m http.server --bind localhost --directory ./ 8000
Open Browser and Visit localhost:8000
The http server could serve the files as plain text,in that case try using other http servers.