Not working in Vue3 at all
See original GitHub issueIm using version 2.1.0
if i import using createapp, then it breaks the entire compilation of vue saying it cannot call method mount of undefined. if i import it as a component from within a component I get the following errors:
Just for using import StarRating from ‘vue-star-rating’ you get the following error in console
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getElementsByTagName')
then we actually using the component you get the following error.
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'isCE')
is there something i’m missing? I have used this loads of times in vue2 with no issues.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Vue 3 component stops working when included in a parent ...
Due to the nature of our project, we want use in-DOM templates. This works fine for a single component. But once a child...
Read more >Javascript doesn't work in Vue3 · Issue #3 · themesberg/flowbite
Hey there, I am using a fresh project with tailwind2, flowbite 1.1.1 and vue3. The backend stack ist laravel 8 (php8) with inertia.js....
Read more >Vue 3 Component not showing - blade is showing - Laracasts
Hello, My vue component is now displaying on the webpage but the content on blade is showing. I have used laravel 8, vue3,...
Read more >Reactivity in Depth - Vue.js
Vue's reactivity system is primarily runtime-based: the tracking and triggering are all performed while the code is running directly in the browser. The...
Read more >Using Vue with TypeScript - Vue.js
All official Vue packages come with bundled type declarations that should work ... This is a bit inefficient and can lead to performance...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m going to check this out in one of my Vue 3 projects to see if I can replicate it. To me, this error looks like it comes from the transpilation of the component, but it was transpiled with the Vue CLI using this command:
npx vue-cli-service build --target lib --name VueStarRating ./src/index.js --mode production
For now, one option would be to transpile it yourself by importing
./src/star-rating.vue
into your components directly, then including the package in your build config for.vue
files, as thenode_modules
folder is likely going to be excluded. (see: https://webpack.js.org/configuration/module/#condition for how to do this using webpack)The CommonJS file isn’t minified because it’s assumed minifcation will be done as part of your own build process.