The error Uncaught SyntaxError: Cannot use import statement outside a module often arises when attempting to use ES6 module syntax (import and export) in an environment that isn’t properly set up to recognize it.
For browser environments, modern browsers, native support ES Modules with type='module' attribute in the