Add "type" attribute to the script tag and set the value to "module" or add "defer" attribute, you can add both, to prevent errors.