question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vuepress build docs Error

See original GitHub issue
  • I confirm that this is a issue rather than a question.

Bug report

Version

  • 0.14.9

Steps to reproduce

vuepress build docs

What is expected?

What is actually happening?

image

Other relevant information

  • Your OS: Mac OS
  • Node.js version: v11.2.0
  • Browser version: chrome 72.0.3626.109
  • Is this a global or local install? global install
  • Which package manager did you use for the install? npm

Please help me with a look

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
1Crazycommented, Feb 23, 2019

@Pearyman 你的问题和我当时遇到的一样,当时我是想全局引入一个vueparticle的组件,你是想找vuepress的入口文件哇,想全局引入组件是吧,建议你使用vuepress1.x的文档,看这篇教程 https://vuepress.vuejs.org/zh/guide/custom-themes.html#应用配置

import Vue from 'vue';
import AppTest from './components/AppTest';

export default (({
  Vue
}) => {
  Vue.use(AppTest)
});
2reactions
shigmacommented, Feb 22, 2019

Ummmm I think you might misunderstand me.

Some vuepress plugins actually need a browser environment, which is the reason for the error you encounted:

require('element-ui') // Error: window is not defined

So if a module cannot be “required” directly from Node, it cannot be used in vuepress, unless it is imported in the mounted hook like this:

export default {
  mounted() {
    import('element-ui').then(/* things to do next */)
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error vuepress build. · Issue #3061 - GitHub
When doing vuepress build I am getting the following error, 10 days ago I could compile the same project. ERROR -->.
Read more >
vuepress build docs get ReferenceError: pageMeta is not ...
I've basically encountered the same error when trying to implement some VuePress theme. AFAICT the pageMeta is related to VuePress rendering ...
Read more >
Netlify build fails on previously successful commit - Vuepress ...
Netlify has been failing to build my vuepress site. My site builds locally without issue. My last successful build was on May. 10...
Read more >
Deploying - VuePress
#!/usr/bin/env sh # abort on errors set -e # build npm run docs:build # navigate into the build output directory cd docs/.vuepress/dist #...
Read more >
Update Vuepress version - Merge requests - GitLab
$ yarn run build yarn run v1.5.1 $ vuepress build docs Extracting site metadata...Error: [vuepress] Cannot resolve Layout.vue file in .vuepress/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found