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

NSVue - Unknown custom element: <canvas> #22

Closed
sebj54 opened this issue Feb 25, 2021 · 4 comments
Closed

NSVue - Unknown custom element: <canvas> #22

sebj54 opened this issue Feb 25, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@sebj54
Copy link

sebj54 commented Feb 25, 2021

Hi!

I followed the documentation and it seems that docs are incomplete.

According to my personal experience with your other plugins, I have to do this in my main.js file:

import Vue from 'nativescript-vue'
import CanvasPlugin from '@nativescript/canvas/vue'

Vue.use(CanvasPlugin)

The fact is that there is no vue folder with version 0.9.9 installed with npm (ns plugin add @nativescript/canvas). So I ended up doing:

import Vue from 'nativescript-vue'

Vue.registerElement('Canvas', () => require('@nativescript/canvas').Canvas)

I wanted to make a PR to update the docs, but maybe you'll want to fix the missing vue folder before.

@triniwiz
Copy link
Member

Thanks will do

@triniwiz
Copy link
Member

Interesting because that directory exists so it seems to be a build issue

@triniwiz triniwiz added the bug Something isn't working label Feb 25, 2021
@sebj54
Copy link
Author

sebj54 commented Feb 25, 2021

Exactly! The vue folder is in the repo but not in the npm package. It's weird because there are other similar folders like react or svelte in the npm package 🤔

@triniwiz
Copy link
Member

fixed in 9f842df

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants