Describe the bug
Vuepress build is failing due to ReferenceError as follows:
npm run docs:build
> lecture@1.0.0 docs:build /Volumes/devtmp/MyVuepress/lecture
> vuepress build docs
wait Extracting site metadata...
tip Apply theme @vuepress/theme-default ...
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ...
tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ...
tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ...
tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...
tip Apply plugin @adamdehaven/custom-tooltip (i.e. "@adamdehaven/vuepress-plugin-custom-tooltip") ...
✔ Client
Compiled successfully in 3.10m
✔ Server
Compiled successfully in 2.84m
wait Rendering static HTML...
[Vue warn]: Error in beforeCreate hook: "ReferenceError: document is not defined"
found in
---> <VueCustomTooltip>
<Root>
error Error rendering /404.html: false
undefined
[Vue warn]: Error in beforeCreate hook: "ReferenceError: document is not defined"
found in
---> <VueCustomTooltip>
<VCc52809a>
<Content>
<Page>
<Layout>
<GlobalLayout>
<Root>
error Error rendering /: false
undefined
ReferenceError: document is not defined
at addStyle (node_modules/@adamdehaven/vue-custom-tooltip/dist/vue-custom-tooltip.esm.js:208:0)
at server-bundle.js:12315:42
at VueComponent.__vue_inject_styles__ (node_modules/@adamdehaven/vue-custom-tooltip/dist/vue-custom-tooltip.esm.js:247:0)
at VueComponent.hook (node_modules/@adamdehaven/vue-custom-tooltip/dist/vue-custom-tooltip.esm.js:163:0)
at invokeWithErrorHandling (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue/dist/vue.runtime.common.dev.js:1850:57)
at callHook (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue/dist/vue.runtime.common.dev.js:4207:7)
at VueComponent.Vue._init (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue/dist/vue.runtime.common.dev.js:4985:5)
at new VueComponent (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue/dist/vue.runtime.common.dev.js:5134:12)
at createComponentInstanceForVnode (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue-server-renderer/build.dev.js:8184:10)
at renderComponentInner (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue-server-renderer/build.dev.js:8408:40)
at renderComponent (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue-server-renderer/build.dev.js:8383:5)
at RenderContext.renderNode (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue-server-renderer/build.dev.js:8294:5)
at RenderContext.next (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue-server-renderer/build.dev.js:2598:23)
at cachedWrite (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue-server-renderer/build.dev.js:2451:9)
at renderElement (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue-server-renderer/build.dev.js:8544:5)
at RenderContext.renderNode (/Volumes/devtmp/MyVuepress/lecture/node_modules/vue-server-renderer/build.dev.js:8296:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lecture@1.0.0 docs:build: `vuepress build docs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lecture@1.0.0 docs:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/takeyuki/.npm/_logs/2020-09-25T09_28_59_429Z-debug.log
Describe the bug Vuepress build is failing due to ReferenceError as follows:
To Reproduce Reproduced with following project: https://github.com/UedaTakeyuki/lecture/
Expected behavior With development server as
npm run docs:dev
is no problem, just build occurs this error.Screenshots
Desktop (please complete the following information):
Additional context Add any other context about the problem here.