imsyy / vitepress-theme-curve

🎉 A Simple VitePress Theme | 一个极简的 VitePress 主题
https://blog.imsyy.top
MIT License
171 stars 52 forks source link

build 时失败, 好像缺少 .vitepress/theme/assets/toolsData.mjs 文件 #19

Closed Daleveral closed 1 month ago

Daleveral commented 1 month ago

执行 pnpm dev 是正常的, 但 pnpm build 时输出如下 : 貌似是缺少了 .vitepress/theme/assets/toolsData.mjs 文件 ? 但目录里并没有这个文件怎么办呢

vitepress-theme-curve@1.0.0 build /root/docs vitepress build

vitepress v1.4.0

User configuration file not found, using default themeConfig. User configuration file not found, using default themeConfig. 文章分页动态路由: [] 分类动态路由: [ { params: { name: '随便说说' } } ] 标签动态路由: [ { params: { name: 'Hello' } } ] x Build failed in 2.09s ✖ building client + server bundles... build error: [vite-plugin-pwa:build] Could not load /root/docs/.vitepress/theme/assets/toolsData.mjs (imported by pages/tools.md): ENOENT: no such file or directory, open '/root/docs/.vitepress/theme/assets/toolsData.mjs' [vite-plugin-pwa:build] Could not load /root/docs/.vitepress/theme/assets/toolsData.mjs (imported by pages/tools.md): ENOENT: no such file or directory, open '/root/docs/.vitepress/theme/assets/toolsData.mjs' Error: Could not load /root/docs/.vitepress/theme/assets/toolsData.mjs (imported by pages/tools.md): ENOENT: no such file or directory, open '/root/docs/.vitepress/theme/assets/toolsData.mjs'  ELIFECYCLE  Command failed with exit code 1.

Daleveral commented 1 month ago

解决 : 删除 pages/tools.md 中的 import toolsData from "@/assets/toolsData.mjs";

imsyy commented 1 month ago

已修复 😂