Answer the question
In order to leave comments, you need to log in
SyntaxError: import declarations may only appear at top level of a module - what is the cause of the error?
Good afternoon! tell me what is the problem with the error
SyntaxError: import declarations may only appear at top level of a module
doing import
Answer the question
In order to leave comments, you need to log in
Is the code transpiled in some way or does it get into the browser in this form?
If the second - https://jakearchibald.com/2017/es-modules-in-browsers/
import declarations may only appear at top level of a module
import declarations may only appear at top level of a module
Well, apparently you placed the import somewhere in the wrong place. In so Wangi is on vacation.
Solved a similar problem as follows:
Just connect:
Replaced with a connection indicating the type:
Inspired here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question