Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Webpack crash to console will keep sapper dev running in background #177

Closed
naturalethic opened this issue Mar 8, 2018 · 1 comment · Fixed by #182
Closed

Webpack crash to console will keep sapper dev running in background #177

naturalethic opened this issue Mar 8, 2018 · 1 comment · Fixed by #182

Comments

@naturalethic
Copy link
Contributor

Repro:

  1. sapper dev
  2. Introduce a webpack error, for example I introduced a syntax error in a json file I was requiring
  3. Sapper crashes to terminal with webpack error
  4. ps ax | grep sapper -- it's still running
  5. Run another sapper dev -- no port conflict announced
  6. Boggle at why an older broken version of sapper is delivering you the wrong .sapper/client/<uid>/*.js files
@Rich-Harris
Copy link
Member

I think this is a webpack bug — it's not calling the callback with an error like it's supposed to. I think the best workaround is to kill the child process if the main process dies — #182.

Luckily this seems to be limited to JSON parsing (and perhaps some other cases, but not JavaScript files or Svelte components)

Rich-Harris added a commit that referenced this issue Mar 10, 2018
kill child process if webpack crashes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants