Skip to content

Consonle error: Cannot use import statement outside a module (at main.js:2:1) #1648

Discussion options

You must be logged in to vote

@sussweb your main.js file should be imported inside html file as a module, not as a text/javascript, so it should be:

<script type="module" src="PATH_TO_YOUR_MAIN_JS_FILE"></script>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sussweb
Comment options

Answer selected by sussweb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants