Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

跑不起来? #1

Closed
xieyezi opened this issue Mar 1, 2020 · 6 comments
Closed

跑不起来? #1

xieyezi opened this issue Mar 1, 2020 · 6 comments
Labels
question 问题 Further information is requested

Comments

@xieyezi
Copy link

xieyezi commented Mar 1, 2020

问题描述

依据 vuepress官方教程搭建出最基本的项目结构之后,跑 docs:dev 命令可以正常运行,接着在项目根目录执行 yarn add vuepress-theme-antdocs ,并且在 config.js配置主题之后,再运行就报错。报错如下:

QQ20200301-181601@2x

目录结构

project
├─── docs
│   ├── README.md
│   └── .vuepress
│       ├── public
│       └── config.js
└── package.json

config.js

module.exports = {
    title: 'Hello VuePress',
    description: 'Just playing around',
    theme: 'antdocs'
}

版本信息

Mac OS: 10.14.6 (18G95)
yarn: 1.22.0
vuepress: @1.1.0
AntDocs: ^0.1.0-beta

@zpfz
Copy link
Owner

zpfz commented Mar 1, 2020

你好,我们已经定位到问题。经测试,该问题的引起可能是由于你的项目没有局部安装 VuePress,直接使用了全局 VuePress 会引起该问题。考虑到用户 VuePress 使用版本不一致以及兼容性,主题默认不再安装 VuePress 依赖,所以使用前请给你的项目安装上 VuePress。

Hello, we have located the problem. After testing, the problem may be caused by VuePress not being installed locally in your project, and directly using global VuePress will cause the problem. Considering that users use VuePress with inconsistent versions and compatibility, the theme no longer installs VuePress dependencies by default, so please install VuePress on your project before use.

@zpfz zpfz added discussion 讨论 question 问题 Further information is requested labels Mar 1, 2020
@zpfz zpfz pinned this issue Mar 1, 2020
@zpfz zpfz closed this as completed Mar 4, 2020
@zpfz zpfz reopened this Mar 4, 2020
@xieyezi
Copy link
Author

xieyezi commented Mar 9, 2020

thank you

@xieyezi xieyezi closed this as completed Mar 9, 2020
@eivmosn
Copy link

eivmosn commented Jul 15, 2020

您好,请问这个主题中有没有方法设置搜索内容为全局关键字的形式展示,现在好像只能搜索到对应的 title

@zpfz
Copy link
Owner

zpfz commented Jul 15, 2020

您好,请问这个主题中有没有方法设置搜索内容为全局关键字的形式展示,现在好像只能搜索到对应的 title

你可能需要返回VuePress文档熟悉一下相关配置,AntDocs除了一些新特性,其他配置与默认主题大同小异,关于搜索内容请详细阅读https://vuepress.vuejs.org/theme/default-theme-config.html#search-box

@eivmosn
Copy link

eivmosn commented Jul 15, 2020

嗯嗯,按照文档确实很多配置信息都有,但是我试图使用 algolia 时,出现了如下报错信息,我查看了您的源代码,发现这个组件确实是存在的不知是否是我的配置方法不对

Screen Shot 2020-07-15 at 11 40 33 AM

[Vue warn]: Failed to mount component: template or render function not defined.

found in

--->


at node_modules/_vuepress-theme-antdocs@1.1.1@vuepress-theme-antdocs/components/Navbar.vue
at node_modules/vuepress-theme-antdocs@1.1.1@vuepress-theme-antdocs/layouts/Layout.vue
at node_modules/
@vuepress_core@1.5.2@@vuepress/core/lib/client/components/GlobalLayout.vue

@zpfz
Copy link
Owner

zpfz commented Jul 16, 2020

嗯嗯,按照文档确实很多配置信息都有,但是我试图使用 algolia 时,出现了如下报错信息,我查看了您的源代码,发现这个组件确实是存在的不知是否是我的配置方法不对

Screen Shot 2020-07-15 at 11 40 33 AM

近期因个人事情繁忙,暂时没有时间对主题的 issue 进行 bug 排查,推荐你进群 867711329 进行交流,后续待 2.0 版本上线后可以对新版本主题优先体验~

@zpfz zpfz unpinned this issue Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question 问题 Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants