Skip to content
This repository has been archived by the owner on Jun 3, 2018. It is now read-only.

Unknown custom element - using Parcel, SFCs and TypeScript #20

Closed
magicznyleszek opened this issue Jan 22, 2018 · 1 comment
Closed

Comments

@magicznyleszek
Copy link

Vue Version

2.5.13

Reproduction link

https://github.com/smutnyleszek/sicx

Steps to reproduce

  1. npm install
  2. npm start
  3. open http://localhost:2038/

What is expected?

Test custom element should be rendered.

What is actually happening?

An error:

Unknown custom element: <test> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <App>
       <Root>

I am learning Vue, so I did rewrite this few times to try making it work. I tried lookin at all other "unknown custom element" issues here, but couldn't find any solution. I have "name" provided in children and I've put them in components object in parent SFC.

@magicznyleszek
Copy link
Author

Ok, I've found the issue - TLDR: my fault.

I had main SFC "App" defined like this:

export default class App extends Vue {};

But this worked:

export default Vue.extend({});

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

No branches or pull requests

2 participants