Closed flacito closed 6 years ago
use ClientOnly can solve it
Duplicate of https://github.com/vuejs/vuepress/issues/786, for now you cannot run dev
and build
at the same time, and this has been addressed at the next version.
I don't have any other projects running with dev
. That log I showed you is a CI build. @ulivz I don't think this is a dupe.
use ClientOnly can solve it
@flacito
See your log:
Error: render function or template not defined in component: SeeSecret
To report an issue that only happens in the scene you are in, the best and direct way is to provide a reproduction repo (e.g. vuepress-issue-example), otherwise I don't know where you are going wrong.
For whoever is still in need of help: I did experience the same issue with a component I made. The solution for me was to wrap it in my .md file inside the ClientOnly
component:
<!-- Inside my-page.md -->
<ClientOnly>
<MyComponent />
</ClientOnly
Be very careful not to put more than 2 spaces or a TAB before <MyComponent />
as Markdown will interpret it as a code block (take a look at #1043 for more details).
You can find more info here: https://vuepress.vuejs.org/guide/using-vue.html#browser-api-access-restrictions
m
Bug report
Version
0.14.4
Steps to reproduce
npx vuepress dev
works finenpx vuepress build
results in a compile error for my custom component in the repo below, error is belowhttps://dev.azure.com/flacito/hello-azure-app-service/_git/hello-azure-vuepress
What is expected?
Success full build with
vuepress build
(I'm actually runningnpx vuepress build
in the repo build)What is actually happening?
This is the log from the Azure DevOps build but the same happens on Mac OS 10.13.6
Other relevant information
Mac OS 10.13.6
10.7.0