-
Notifications
You must be signed in to change notification settings - Fork 808
SyntaxError: Cannot use import statement outside a module #287
Comments
You are using NodeJS Version 17, which may be the cause of this error. It's working fine for me using NodeJS 16. |
I'm not seeing this on Node 17.7.2. It works fine for me. |
After further debugging, the issue is somehow related to running from a mapped network drive. I will update this post as I discover more. |
I'm having this issue as well. Running node 17 on windows 10. No mapped drives are used in this project. I do not have any mapped drives. |
I'm having this issue as well. Running node 16.13.2 on windows 10. No mapped drive. |
I've just tested this again on a fresh Windows 10 sandbox, Node 16.13.2, and cannot reproduce it. |
I can confirm it works in sandbox. |
Maybe it's related to rollup/rollup#4439. Can you check if your path has a different casing between the terminal and the file system? |
I tried, and it fails with this error on both C, D, etc. I couldn't find such a place where it works. |
@jasonlyu123 Yes, that's it. As soon as I changed |
Describe the bug
When testing Svelte for the very first time, it throws an error.
Reproduction
npx degit sveltejs/template my-svelte-project
cd my-svelte-project
npm install
npm run dev
Logs
No response
System Info
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: