My advice on solving this problem I encountered
If you are using the
Why? And how can you make ES6 modules work in browsers?
<script type="module" src="index.js"></script>
and things should now work fine.