Open flozero opened 5 years ago
Same issue in my side. I found a similar issue ever been closed https://github.com/vuejs/vue-loader/issues/1170. I guess something wrong with the coordination between the vue-template-compiler and SSR render version used by VuePress 1.x.
Just use normal component can work around.
How do you call your functional component? if with lazy import (example) :
components: { example: () => import('@/components/example.vue') }
,
it can generates this error !
TypeError: _vm._ssrNode is not a function
at render (src/components/T.vue?8d6b:1:46)
Need to import it with no lazy import.
Bug report
Steps to reproduce
Use this:
Register the component with plugin-register-component
What is expected?
It should work as development.
What is actually happening?
You got this errror when you are trying to build the documentation
Other relevant information
When you run the dev docs command it working. Or if you are using rendering function in script and adding functional: true. The build working in this case too.
Why this is not working with ?
[ ] My VuePress version is lower and euqal than
1.0.0-alpha.47
:[x] My VuePress version is higher than
1.0.0-alpha.47
, the following is the output ofnpx vuepress info
in my VuePress project:System: OS: macOS 10.14.5 CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Binaries: Node: 10.15.1 - /usr/local/bin/node Yarn: 1.16.0 - ~/.npm-packages/bin/yarn npm: 6.9.0 - ~/.npm-packages/bin/npm Browsers: Chrome: 74.0.3729.169 Firefox: 67.0 Safari: 12.1.1 npmPackages: @vuepress/core: 1.0.1 @vuepress/theme-default: 1.0.1 vuepress: ^1.0.0-beta.2 => 1.0.1 npmGlobalPackages: vuepress: Not Found