Skip to content

SSR not showing any warning for unknown tag #6998

@IlyaSemenov

Description

@IlyaSemenov

Version

2.5.3

Reproduction link

https://jsfiddle.net/semenov/1oa635w8/

Steps to reproduce

Run jsfiddle and note the warning message that is printed to the console.

Then run the same code with SSR:

const Vue = require('vue')
const app = new Vue({
  template: '<div><bing-bang/></div>',
})

const renderer = require('vue-server-renderer').createRenderer()

renderer.renderToString(app, (err, html) => {
  if (err) throw err
  console.log(html)
})

Like this: DEBUG=* node test.js

What is expected?

The SSR rendering prints a warning similar to what client-side rendering emits:

[Vue warn]: Unknown custom element: <bing-bang> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

(found in <Root>)

What is actually happening?

SSR simply renders invalid HTML:

<div data-server-rendered="true"><bing-bang></bing-bang></div>

without any warnings.


This inconsistency makes it hard to refactor big Nuxt.js apps, as missing/unregistered components get silently ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions