dingshaohua-com / vuepress-theme-sidebar

vuepress自动根据文件生成侧边栏的主题
18 stars 1 forks source link

改进包文件获取方式修复潜在问题 #6

Closed FurryRbl closed 6 months ago

FurryRbl commented 6 months ago

相关issuse:https://github.com/dingshaohua-cn/vuepress-theme-sidebar/issues/4

可能导致的问题:

PS P:\StellarRealm\website\project\wiki> yarn dev
yarn run v1.22.21
$ vuepress dev wiki
Error: ENOENT: no such file or directory, open 'P:\StellarRealm\website\project\wiki\node_modules\@vuepress\theme-default\lib\client\components\Page.vue'
    at Object.readFileSync (node:fs:453:20)
    at file:///P:/StellarRealm/website/node_modules/vuepress-theme-sidebar/index.js:10:26
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadUserConfig (file:///P:/StellarRealm/website/node_modules/@vuepress/cli/dist/index.js:77:18)
    at async CAC.dev (file:///P:/StellarRealm/website/node_modules/@vuepress/cli/dist/index.js:465:52)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

错误路径:P:\StellarRealm\website\project\wiki\node_modules\@vuepress\theme-default\lib\client\components\Page.vue 正确路径:P:\StellarRealm\website\node_modules\@vuepress\theme-default\lib\client\components\Page.vue