FredKSchott / snowpack

ESM-powered frontend build tool. Instant, lightweight, unbundled development. ✌️
https://www.snowpack.dev
MIT License
19.48k stars 922 forks source link

🐛 BUG: Cannot find module 'svelte-hmr/runtime/hot-api-esm.js' #3800

Open woss opened 3 years ago

woss commented 3 years ago

Quick checklist

What package manager are you using?

pnpm

What operating system are you using?

linux - wsl2 debian

Describe the bug

The template will not start and throws the error : [13:23:57] [snowpack] Cannot find module 'svelte-hmr/runtime/hot-api-esm.js'

Steps to reproduce

  1. pnpx create-snowpack-app web-app --template @snowpack/app-template-svelte-typescript --use-pnpm
  2. cd web-app
  3. pnpm start
  4. Error! Output below. What i expected is that works and spins the dev server.
    [13:23:56] [snowpack] Welcome to Snowpack! Because this is your first time running
    this project, Snowpack needs to prepare your dependencies. This is a one-time step
    and the results will be cached for the lifetime of your project. Please wait...
    [13:23:56] [snowpack] + svelte/internal@3.44.1
    [13:23:57] [snowpack] Cannot find module 'svelte-hmr/runtime/hot-api-esm.js' from

Link to minimal reproducible example (optional)

No response

TicTak21 commented 3 years ago

+1 on MacOS

Update: npm works as expected

woss commented 3 years ago

Missing dev dependency of "svelte-hmr": "^0.14.7", caused the issue, adding it solves the problem.