Comments (19)
Confirmed. I tried to follow the official Nuxt guide for plugins, But that did not work:
// plugins/vue-ellipse-progress.js
import Vue from 'vue';
import VueEllipseProgress from "vue-ellipse-progress";
Vue.use(VueEllipseProgress);
// nuxt.config.js
plugins: [
{
src: '@/plugins/vue-ellipse-progress.js',
mode: 'client'
},
],
<client-only>
<vue-ellipse-progress :progress="50" />
</client-only>
Although the error disappears, another error Unknown custom element: <vue-ellipse-progress>
appears instead. I am not a Nuxt expert and have tried all possible options found, but without success.The error has only to do with Vue Build and Nuxt, not with the source code. I need to invest more time in this, any help is much appricated.
EDIT
I finally found an older Nuxt project where i originally tested the component, with the same config as above, latest v1.3.0
with Nuxt 2.15.3
, works just fine! So, the problem is to find correct config and tell Nuxt that the lib must be used only on the client side
from vue-ellipse-progress.
You can call plugin in mouted.
Template
<template>
<component
:is="vueEllipseProgress"
v-if="vueEllipseProgress"
:progress="progress"
/>
</template>
Script
data() {
return {
vueEllipseProgress: null
}
},
mounted() {
const { VueEllipseProgress } = require('vue-ellipse-progress')
// console.log(vueEllipseProgress)
this.vueEllipseProgress = VueEllipseProgress
// console.log(VueEllipseProgress.default)
},
from vue-ellipse-progress.
So, the plugin initialization in my first comment is correct and it works! I just realized that i imported Vue
instead of vue
π. That was just a little typo that had made me crazy.
from vue-ellipse-progress.
@matamune94 yes, that is another approach that might be useful in other environments. I use this for example in the new docs site (available soon) in Vuepress.
from vue-ellipse-progress.
so how can we fix this issue?
from vue-ellipse-progress.
@timon0305 just by following the Nuxt 2/Nuxt 3 official guides for plugins. Maybe the info in the new yet unreleased docs can also be useful.
from vue-ellipse-progress.
@timon0305 just by following the Nuxt 2/Nuxt 3 official guides for plugins. Maybe the info in the new yet unreleased docs can also be useful.
Could you please tell me more ?
from vue-ellipse-progress.
what is your setup? What exactly is not forking for you from the linked guides and what are the errors?
from vue-ellipse-progress.
When I start project, it says there is no issue.
But as you can see, project is not runinig
from vue-ellipse-progress.
i don't see any evidence that the error is related to this plugin. You have to investigate the error more deeply and find detailed error logs.
from vue-ellipse-progress.
project said there is no issue.
from vue-ellipse-progress.
i can't help you debugging your project. If you have some concrete issue with the plugin, please open new issue and describe your problem detailed as possible. This issue was already resolved
from vue-ellipse-progress.
if resolved, where can I find?
from vue-ellipse-progress.
right here
from vue-ellipse-progress.
I tried to import that module but I got new issue
from vue-ellipse-progress.
Did you added the plugin as Nuxt plugin following the official Nuxt documentation?
from vue-ellipse-progress.
yes
from vue-ellipse-progress.
Could you please share your project or at least all relevant code parts?
from vue-ellipse-progress.
this project is private
from vue-ellipse-progress.
Related Issues (20)
- this project cant be used with typescript HOT 2
- How can I go around and then go around again
- What event triggered it? HOT 1
- Gradient not applying correctly HOT 2
- ssr aware HOT 4
- when I use it in iphone6s with ios9οΌit Abnormal display HOT 4
- I guess I cant installed it tell me why and pls help me fixing HOT 6
- Can i define `:progress = (value)` HOT 3
- Typescript support HOT 2
- Create non-pluggin version of the library HOT 2
- $ref is undefined when 'data' is specified on [email protected] HOT 1
- Usage with vue3 + composition API HOT 2
- Trying to display legend on a multiple line ("data" driven chart) HOT 2
- Can't import on Vue 3 HOT 3
- confused on using slot property on vue3 HOT 3
- Responsive sizing? HOT 6
- legendClass example HOT 2
- Animation Triggers Twice upon Mounting in Safari and Ionic App HOT 3
- Remove unused space for half circle HOT 1
- Add circle slot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-ellipse-progress.