staskobzar/vue-audio-visual

Warning: export 'h' was not found in 'vue'

set-killer opened this issue · 5 comments

Hello,

I'm using Vue version ^2.6.14

When i run npm run serve i get the following error:

WARNING  Compiled with 1 warning
warning  in ./node_modules/vue-audio-visual/src/components/AvMedia.js

"export 'h' was not found in 'vue'

This issue occurs after i have updated to vue-audio-visual version 2.3.0
Previously i was using version 2.2.2 of this library and there was no such issue.

Is version 2.3.0 compatible with Vue 2?

Thank you.

Hello,

Yes, version 2.3.0 is compatible with Vue 2. I am using it with Vue 2 in production.
This warning is produced by the part of the code that makes it compatible with Vue 3.
You can safely ignore it.

Regards,

Okay, thank you.
Currently I've downgraded to 2.2.2 but I'll update it soon.

Could this warning be fixed with something like this:

import Vue from 'vue'
if (Vue.version.startsWith('3.')) {
  // import other stuff
}

Thank you.

I am not sure I will be able to do it anytime soon due to my work load. And as it is not a bug or error but just a warning I do not see it as a priority.
If you have a working patch, please, feel free to contribute and send me a pull request.
Thank you and have a good day,

Hello Staskobzar,
I perfectly understand you about the work load. I may try to provide a working patch but that could take some time because the free time is a scarce.

Have a nice day.

Okay, so it turned out that this is a common issue that can be found in other Vue extensions too.
One of the possible solutions is to import the whole Vue object, and then check if there is h method or not. But that is not really desirable, because it will import many files, some of which may be potentially unnecessary.

Another solution would be to have export h = false in VueJS 2 to ensure forward compatibility with the extensions, but that is dependent on the developers of the Vue2 project.

Thank you for the discussion.
Hope you have more free time to do some awesome stuff.
Have a nice day!