Closed Toilal closed 3 years ago
Please note that removing ^https?://(?:api[\.-])?{{core.domain.sub}}\.{{core.domain.ext}}$
part from the snippet make things work, so it seems there's something in the regex that triggers the crash.
I have narrowed things down, and it seems to crash because of the mustache {{...}}
pattern if it occurs more that one time.
Pass
{{a}}
Pass
{{b}}
Fail
{{a}} {{b}}
And the stacktrace, it seems to crash in vite vue plugin.
[vite] Internal server error: Cannot read property 'line' of undefined
Plugin: vite:vue
File: /@slidev/slides/10.md
at createRollupError (C:\Users\FRUP67305\projects\MENJ-Accompagnement-Dev-Workflow\node_modules\@vitejs\plugin-vue\dist\index.js:4092:29)
at C:\Users\FRUP67305\projects\MENJ-Accompagnement-Dev-Workflow\node_modules\@vitejs\plugin-vue\dist\index.js:4346:51
at Array.forEach (<anonymous>)
at transformMain (C:\Users\FRUP67305\projects\MENJ-Accompagnement-Dev-Workflow\node_modules\@vitejs\plugin-vue\dist\index.js:4346:12)
at TransformContext.transform (C:\Users\FRUP67305\projects\MENJ-Accompagnement-Dev-Workflow\node_modules\@vitejs\plugin-vue\dist\index.js:4665:16)
at Object.transform (C:\Users\FRUP67305\projects\MENJ-Accompagnement-Dev-Workflow\node_modules\vite\dist\node\chunks\dep-e9a16784.js:44268:53)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async transformRequest (C:\Users\FRUP67305\projects\MENJ-Accompagnement-Dev-Workflow\node_modules\vite\dist\node\chunks\dep-e9a16784.js:58540:29)
at async viteTransformMiddleware (C:\Users\FRUP67305\projects\MENJ-Accompagnement-Dev-Workflow\node_modules\vite\dist\node\chunks\dep-e9a16784.js:58678:32)
Works fine for me, have you upgraded to the latest version?
Slidev v0.12.1, installer with npm.
Important stuff, and i'm sorry about that, I run on Windows NodeJS 14.17.0. I'll give a try on my linux computer right now.
Ah, why are you using ###
instead of ```? If they are not inside of code blocks, mustache are treated as Vue template interpretations.
###
are comments inside the snippet I want to display in slide. But anyway, I can reproduce the error without those symbols, on Linux Ubuntu too.
Please clone this minimal reproduction repository : https://github.com/Toilal/slide-issue-repro
npm install & npm run dev
, you should be able to reproduce the crash.
I can reproduce this error on my machine with create-slidev@0.12.1
:
[plugin:vite:vue] ENOENT: no such file or directory, open '/@slidev/slides/1.md'
strange message, not sure where is the problem yet.
I try to embed this code in a slide, but it seems to make slidev crash.
To reproduce, run
npm init slidev
and add this snippet surrounded with usual three backticks and langage into first slide.