Cannot use import statement outside a module
<script type="module" src="main.js"></script>
Cannot use import statement outside a module
<script type="module" src="main.js"></script>
cannot use import statement outside a module typescript
// Fix 1
Change .js files to .cjs
// Fix 2
Add "type": "module" to package.json
js Cannot use import statement outside a module
[Solved] “Uncaught SyntaxError: Cannot use import statement outside a module” when importing ECMAScript 6
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us