slidev icon indicating copy to clipboard operation
slidev copied to clipboard

Two dev servers on the same port cause setup functions wrongly loaded

Open ChristopherWMM opened this issue 6 months ago • 2 comments

Describe the bug

Sometimes, the initial run of the dev preview does not load custom code-runner implementations.

Minimal reproduction

Steps to reproduce the behavior:

  1. Execute npm run dev while having VSCode extension preview tab active
  2. Attempt to manually run / auto-run a non-standard monaco runner
  3. See Error: Runner for language "<lang>" not found on one of the presentations (in-editor or in-browser)

See slidev-code-runner for an example with a custom Python implementation in ./setup/code-runners.ts

Environment

  • Slidev version: v0.49.26 (using npm create slidev@latest)
  • Browser: Chrome
  • OS: Windows 10

Notes

This issue only occurs sometimes on the initial load of the dev preview, any subsequent loads after making edits to the project are fine. The built version of the project also appears to be fine.

ChristopherWMM avatar Aug 20 '24 18:08 ChristopherWMM