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

使用vue-server-renderer渲染template时编译出错,但是renderToString回调中的err对象为空 #6766

Closed
imingyu opened this issue Oct 10, 2017 · 1 comment

Comments

@imingyu
Copy link

imingyu commented Oct 10, 2017

Version

2.4.4

Reproduction link

https://github.com/imingyu/vue-server-renderer-bug.git

Steps to reproduce

在node端运行下列代码:

const Vue = require('vue')
const app = new Vue({
    template: `<span>123</span> <div>Hello World</div>`
})
const renderer = require('vue-server-renderer').createRenderer()
renderer.renderToString(app, (err, html) => {
    if (err) throw err;//因为模板是不正确的,会报错,但是此处的err对象确实空的
    console.log('success:'+html)
})

What is expected?

编译模板出错时,renderToString的回调函数中第一个参数(err)应该包含错误信息

What is actually happening?

renderToString的回调函数中第一个参数无内容

ztlevi pushed a commit to ztlevi/vue that referenced this issue Feb 14, 2018
f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
@amangqq
Copy link

amangqq commented Feb 3, 2021

我是2.6.12版本,也是这个错啊

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

2 participants