slidev 导出前 安装playwright-chromium失败
直接参考上述
npm i -D playwright-chromium
报错
\ [0/1] Installing playwright-core@1.49.1
[npminstall:runscript:error] playwright-chromium@latest run install node install.js error: Error: Command failed with exit code 1: node install.js
更换cnpm或者删除node_modules重新进行也不行
解决方法,先安装playwright再执行slidev要求的安装命令
cnpm init playwright@latest
然后是JavaScript,中间的选项看着选吧
然后再
cnpm i -D playwright-chromium
(node:53512) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
√ Linked 2 latest versions fallback to D:\xxxx\node_modules\.store\node_modules
Recently updated (since 2024-12-05): 2 packages (detail see file D:\xxxx\node_modules\.recently_updates.txt)
√ Run 1 script(s) in 31s.
√ Installed 1 packages on D:\xxxx
√ All packages installed (2 packages installed from npm registry, used 32s(network 32s), speed 0B/s, json 0(0B), tarball 0B, manifests cache hit 2, etag hit 2 / miss 0)
就能正常导出了
npx slidev export
●■▲
Slidev v0.50.0-beta.10
theme yyyyy
css engine unocss
entry D:\xxxxx\slides.md
✓ exported to ./slides-export.pdf
作者:qbning
-------------------------------------------
个性签名:曾经的我们空有一颗望海的心,却从没为前往大海做过真正的努力
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!