question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'import' and 'export' may only appear at the top level

See original GitHub issue

Hi Oleg, Malina gave me (plugin malina) SyntaxError: ‘import’ and ‘export’ may only appear at the top level;

let Cmp
function onMount(){
   import('./test.html').then(module=>Cmp=module.default))
})

How to write <svelte:component this={Cmp}/> in Malina? Please, help. Im trying to convert my app to malina. Thanks

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
ulmzrcommented, Sep 15, 2020

Malina is still a “baby” but so cool. Is there any forum or community of MalinaJS?

Read more comments on GitHub >

github_iconTop Results From Across the Web

'import' and 'export' may only appear at the top level
I'm using webpack with vuejs. Webpack does its thing, but when I look at the outputted app.js file, it gives me this error....
Read more >
'import' and 'export' may only appear at the top level | bobbyhadz
The error "import and export may only appear at the top level" occurs when we forget a closing brace when declaring a function...
Read more >
'import' and 'export' may only appear at the top level · Issue #304
Error: 'import' and 'export' may only appear at the top level abc: ../../node_modules/lodash-es/isBuffer.js (1:0) abc: 1: import root from ' ...
Read more >
How to fix: import and export may only appear at the top level
So I've setup a new Svelte project and install all the latest node modules. ... If you're developing a Svelte project, you're probably...
Read more >
Import and export may only appear at the top level
The error "import and export may only appear at the top level" may occur due to a missing closing brace when declaring a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found