Closed woshixiaoqianbi closed 4 years ago
// 这是我的config.js 配置拆件的地方 theme: 'vuepress-theme-yilia-plus', themeConfig: { nav: [ // 导航栏配置 { text: '主页', link: '/' }, { text: '技术笔记', items: [ { text: '前端开发笔记', link: '/frontend/' } ] }, { text: '关于', link: '/about/' }, ], sidebar: { // 侧边栏配置 '/frontend/': [ "", "/framework/vue/test" ], // '/ios/': [ // "", // "ios" // ], // '/web/': [ // "", // "web" // ] }, sidebarDepth: 2, lastUpdated: 'last updated', yilia_plus: { // github-corner(关闭请设置为false) // github: { // url: "https://github.com/JoeyBling/vuepress-theme-yilia-plus" // }, footer: { // 网站成立年份(若填入年份小于当前年份,则显示为 2018-2019 类似的格式) since: 2019, // 网站作者(关闭请设置为false) author: '<a href="https://github.com/JoeyBling/" target="_blank">試毅-思伟</a>', // 访问量统计功能(不蒜子) busuanzi: { // 是否启用(关闭请设置为false) enable: true } } } }
// 这是控制台的error vue.runtime.esm.js?9698:619 [Vue warn]: Failed to resolve async component: () => __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*! ./node_modules/_vuepress-theme-yilia-plus@1.0.0@vuepress-theme-yilia-plus/layouts/Layout.vue */ "./node_modules/_vuepress-theme-yilia-plus@1.0.0@vuepress-theme-yilia-plus/layouts/Layout.vue")) Reason: Error: Cannot find module '@SearchBox'
@woshixiaoqianbi 请贴一下你的package.json文件里dependencies节点的依赖关系
package.json
dependencies
@woshixiaoqianbi 我测试了下应该是缺少vuepress的模块,你试试在项目根目录执行
npm install vuepress --save
然后再重新编译运行一下试试
@JoeyBling en,问题的原因是我用cnpm装的依赖,应该是漏掉了一些依赖