sveltejs / sapper-template

Starter template for Sapper apps
703 stars 214 forks source link

The "'import' and 'export' may only appear at the top level" issue #214

Closed 5amch3n closed 4 years ago

5amch3n commented 4 years ago

Yesterday I followed the steps on https://sapper.svelte.dev/ to clone the 'my-app' project, but when I got everything ready and executed the command

npm run dev

this error occurred sapper-issue

This confused me a lot, because I had done the same thing on my MacBook Pro and it had been working without any errors.

So there must be something different between the code on my PC and Mac... Finally I found that the generated "package-lock.json" file was different(they use different versions of rollup plugins). I would like to suggest a working "package-lock.json" file be put in the github repo.

5amch3n commented 4 years ago

Just noticed that it had been solved in commit 26c5471 ...