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

template functional in <template> not working when render function does #1654

Open
2 of 3 tasks
flozero opened this issue Jun 12, 2019 · 2 comments
Open
2 of 3 tasks

Comments

@flozero
Copy link
Collaborator

flozero commented Jun 12, 2019

  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

Use this:

<template functional>
</template>

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

TypeError: _vm._ssrNode is not a function
    at render (src/components/T.vue?8d6b:1:46)

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:

    • VuePress version:
    • OS:
    • Node.js version:
    • Browser version:
    • Is this a global or local install?
    • Which package manager did you use for the install?
    • Does this issue occur when all plugins are disabled?
  • My VuePress version is higher than 1.0.0-alpha.47, the following is the output of npx 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

@towertop
Copy link

Same issue in my side. I found a similar issue ever been closed vuejs/vue-loader#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.

@alaa-essaies
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants