Description
Describe the bug
I have issues when running my presentation with the magic-move feature.
- The slide fails to load and displays the "An error occurred on this slide. Check the terminal for more information.".
- The browser console gives the following error message: "slide failed to load SyntaxError: The requested module 'http://localhost:3031/slidev-template/node_modules/lz-string/libs/lz-string.js?v=57f97925' doesn't provide an export named: 'default' slides:20:23"
Minimal reproduction
Steps to reproduce the behavior:
I am using custom theme as a submodule: https://github.com/3mdeb/slidev-template
-
git clone https://github.com/3mdeb/slidev-template.git
- clone the custom template -
Create the file slides.md with the following content:
--- theme: ./slidev-template/theme layout: cover background: /intro.png class: text-center --- # Hello World Hello World --- style: | --slidev-code-font-size: 16px; --- ````md magic-move ```js console.log(`Step ${1}`) ``` ```js console.log(`Step ${1 + 1}`) ``` ```ts console.log(`Step ${3}` as string) ``` ````
-
cd slidev-template
- go to the template directory -
npm install @slidev/cli@latest
- update to latest slidev. -
./scripts/local-preview.sh ../slides.md
- This script creates virtual environment and installs dependencies, then starts the presentation. -
In the presentation, go to the next slide (with magic-move).
Expected result:
Presentation works normally, code changes via the magic-move.
Actual result:
- The slide fails to load and displays the "An error occurred on this slide. Check the terminal for more information.".
- The browser console gives the following error message: "slide failed to load SyntaxError: The requested module 'http://localhost:3031/slidev-template/node_modules/lz-string/libs/lz-string.js?v=57f97925' doesn't provide an export named: 'default' slides:20:23"
Environment
- Slidev version: v51.6.0 (latest)
- Browser: Firefox
- OS: Fedora Linux 41