sveltejs / sapper-template

Starter template for Sapper apps
703 stars 214 forks source link

Getting started tutorial: Live reload not working #303

Closed tri-nga closed 3 years ago

tri-nga commented 3 years ago

Hello everyone, I would really like to learn Svelte/Sapper (while waiting for svelte-kit) development but I have this issue actually. Started the https://sapper.svelte.dev/docs#Getting_started Done this

npx degit "sveltejs/sapper-template#rollup" my-app
# or: npx degit "sveltejs/sapper-template#webpack" my-app
cd my-app
npm install
npm run dev

Here's the output:

❯ npm run dev

> TODO@0.0.1 dev
> sapper dev

✔ server (1.6s)
✔ client (2.1s)
✔ service worker (190ms)
> Listening on http://localhost:3000

Live reloading is not working.

I have searched for existing issues here before posting, but I have not found solutions to the problem. Could you please provide any help ? Thanks

ps: I'm on Windows 10, and I'm using Ubuntu 20.04 on WSL 2 with no issues so far, except this :)

Conduitry commented 3 years ago

If your project lives on your Windows filesystem, WSL fails to report the file change events that Node is listening for. This is a known bug/limitation in WSL 2. If your project lives in the virtual Linux filesystem, the file watching should work fine.

Conduitry commented 3 years ago

See also https://github.com/sveltejs/sapper/issues/1150

tri-nga commented 3 years ago

Oh, sorry didn't know about that limitation. My bad.

Thank you very much, will try to move the project directory, or try to avoid wsl if possible. Thanks ☺️