Failing to build Svelte with it as a Streaming Import. What am I doing wrong? #2641
Unanswered
airimiea
asked this question in
Troubleshooting
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm following the Getting Started with Svelte tutorial.
I do the following:
npx create-snowpack-app svelte-snowpack --template @snowpack/app-template-minimal cd svelte-snowpack npm run start
At this point it works just fine. I can see the generated app in the browser.
I have snowpack as a dev dependency:
I add Svelte as a Streaming Import as I also follow instructions from the Streaming Imports tutorial:
I add
App.svelte
and reference it inindex.js
, as illustrated in the tutorial.I add the Svelte plugin and run again:
I get:
Error: Cannot find module 'svelte/compiler'
I install Svelte as a dev dependency and run again:
Now it works and I can see the app in the browser.
But if I run
npm run build
I get another error:What am I doing wrong? Did I misunderstand how Streaming Imports are used?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions