Debugging Log for SliDev
Outline
npm run exportnot working with an playwright install error?- Slidev build with base Error: Could not resolve entry module (index.html)
npm run export not working with an playwright install error?
text
❯ npm run export
> export
> slidev export
●■▲
Slidev v0.19.9
theme slidev-theme-light-icons
entry /Users/USERNAME/Documents/GitHub/Slidev_Cybozu/Discourse_URL/slides.md
browserType.launch: Executable doesn't exist at /Users/USERNAME/Library/Caches/ms-playwright/chromium-901522/chrome-mac/Chromium.app/Contents/MacOS/Chromium
╔═════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright Test or Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ npx playwright install ║
║ ║
║ <3 Playwright Team ║
╚═════════════════════════════════════════════════════════════════════════╝
at exportSlides (/Users/USERNAME/Documents/GitHub/Slidev_Cybozu/Discourse_URL/node_modules/@slidev/cli/dist/export-UU2AY26K.js:65:34)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.handler (/Users/USERNAME/Documents/GitHub/Slidev_Cybozu/Discourse_URL/node_modules/@slidev/cli/dist/cli.js:257:12) {
name: 'Error'
}Attempts:
- Removing the cache folder on
/Users/username/Library/Caches/ms-playwright npm i -D @playwright/testnpx playwright installyarn add playwright-chromiumnpm add playwright-chromium
Solution:
- Clean install of slidev (do not duplicate old project)
npm init slidevnpx slidev exportnpm i playwright-chromiumnpx slidev export- --> exported to ./slides-export.pdf
Solution 2:
- Delete
node_modulesfolder npm inpm i -D playwright-chromiumnpx slidev export- --> exported to ./slides-export.pdf
Slidev build with base Error: Could not resolve entry module (index.html)
Attempting Command:
npx slidev build "./slides/slidev_template.md" "--base" "/slides/slidev_template/"
shell
# Attempting to build a SPA with slidev
❯ npx slidev build "./slides/slidev_template.md" "--base" "/slides/slidev_template/"
●■▲
Slidev v0.27.20
theme @slidev/theme-seriph
entry /Users/USERNAME/Documents/GitHub/Talks/slides/slidev_template.md
vite v2.8.6 building for production...
✓ 0 modules transformed.
Could not resolve entry module (index.html).
Error: Could not resolve entry module (index.html).
at error (/Users/USERNAME/Documents/GitHub/Talks/node_modules/rollup/dist/shared/rollup.js:198:30)
at ModuleLoader.loadEntryModule (/Users/USERNAME/Documents/GitHub/Talks/node_modules/rollup/dist/shared/rollup.js:22436:20)
at async Promise.all (index 0) {
code: 'UNRESOLVED_ENTRY'
}Test 1:
- Moving slides.md to the root folder
npx slidev build slides.md- Works ✅
Test 2:
- Renaming the slides.md to panda.md
npx slidev build panda.md- works ✅
Test 3:
- Added the base option
npx slidev build panda.md "--base" "/slides/slidev_template/"- works ✅
Test 4:
- Moved the panda.md to
slide_decks/panda.md npx slidev build "slide_decks/panda.md" "--base" "/slides/slidev_template/"- Error 😵
shell
❯ npx slidev build "slide_decks/panda.md" "--base" "/slides/slidev_template/"
●■▲
Slidev v0.27.20
theme @slidev/theme-seriph
entry /Users/USERNAME/Documents/GitHub/Talks/slide_decks/panda.md
vite v2.8.6 building for production...
✓ 0 modules transformed.
Could not resolve entry module (index.html).
Error: Could not resolve entry module (index.html).
at error (/Users/USERNAME/Documents/GitHub/Talks/node_modules/rollup/dist/shared/rollup.js:198:30)
at ModuleLoader.loadEntryModule (/Users/USERNAME/Documents/GitHub/Talks/node_modules/rollup/dist/shared/rollup.js:22436:20)
at async Promise.all (index 0) {
code: 'UNRESOLVED_ENTRY'
}Issue: Bug Report - npm run build for a MD file in a subfolder leads to an Error: Could not resolve entry module (index.html)
Describe the bug
When trying to run npm run build for a Slidev project where the slides.md is in a subfolder ends with an error.
Attempted Command
shell
npx slidev build "slide_decks/slides.md" "--base" "/slides/slidev_template/"Result
shell
●■▲
Slidev v0.27.20
theme @slidev/theme-seriph
entry /Users/USERNAME/Documents/GitHub/Talks/slide_decks/slides.md
vite v2.8.6 building for production...
✓ 0 modules transformed.
Could not resolve entry module (index.html).
Error: Could not resolve entry module (index.html).
at error (/Users/USERNAME/Documents/GitHub/Talks/node_modules/rollup/dist/shared/rollup.js:198:30)
at ModuleLoader.loadEntryModule (/Users/USERNAME/Documents/GitHub/Talks/node_modules/rollup/dist/shared/rollup.js:22436:20)
at async Promise.all (index 0) {
code: 'UNRESOLVED_ENTRY'
}Tests I have conducted
Test 1:
- Running the command when the slides.md is the root folder
npx slidev build slides.md- Works ✅
Test 2:
- Renaming the slides.md to panda.md
npx slidev build panda.md- works ✅
Test 3:
- Added the base option
npx slidev build panda.md "--base" "/slides/slidev_template/"- works ✅
Test 4:
- Moved the panda.md to
slide_decks/panda.md npx slidev build "slide_decks/panda.md" "--base" "/slides/slidev_template/"- Error 😵
Test 5:
Attempt to run build command from a markdown file in a subfolder without
baseoptionnpm run build slide_decks/panda.mdError 😵
shell> build > slidev build "slide_decks/panda.md" ●■▲ Slidev v0.27.20 theme @slidev/theme-seriph entry /Users/USERNAME/Downloads/test/slidev/slide_decks/panda.md vite v2.8.6 building for production... ✓ 0 modules transformed. Could not resolve entry module (index.html). Error: Could not resolve entry module (index.html). at error (/Users/USERNAME/Downloads/test/slidev/node_modules/rollup/dist/shared/rollup.js:198:30) at ModuleLoader.loadEntryModule (/Users/USERNAME/Downloads/test/slidev/node_modules/rollup/dist/shared/rollup.js:22436:20) at async Promise.all (index 0) { code: 'UNRESOLVED_ENTRY' }
To Reproduce
Steps to reproduce the behavior:
- Create a Slidev project:
npm init slidev - Create a folder:
mkdir subfolder_test - Move the
slides.mdinto the folder - Attempt to run build:
npm run build subfolder_test/slides.md - See error message in the terminal
Desktop / Environment
- OS:
macOS Monterey version 12.2.1 - Browser:
Google Chrome Version 99.0.4844.51 (Official Build) (x86_64) - Slidev version:
Slidev v0.27.20
Thank you for your time 🙇♂️