-
Notifications
You must be signed in to change notification settings - Fork 85
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
Cannot set property '$gtm' of undefined => Use vue-gtm: 3.0.0-vue2 without ~ or ^ #98
Comments
Please use the vue-2 version of the plugin |
@popovdk Please close this issue if this fixed your problem 🙂 |
What do you have in your Please try {
...
"dependencies": {
...
"vue-gtm": "3.0.0-vue2"
}
} without If you are using I can confirm that 3.0.0-vue2 is really the vue2 branch: https://unpkg.com/[email protected]/dist/index.js |
this works for me, thanks a lot |
Sorry guys, I'm a little confused: Anyway, I still get
|
also please clear your node_modules and perform npm or yarn install again |
Can the requirement |
Sure, if you want you can open a PR :) |
@lane-c-wagner Added 6f15774 |
Is there any way to protect a use of |
If you know a strategy, please let me know! |
@Shinigami92 you need to create 2 different packages for each project, that's the most common-sense solution. Plus your issues for different Vue versions won't mix up and it will all look more organized this way. I guess you can even use a package namespace, something similar to vue or nuxt is doing. e.g. |
For doing so, I need permission by the license owner @mib200 Currently I even don't have permission to protect the |
Can this be solved in a more generic way, so you would not need that additional layer? |
What do you think about checking the vue version and depending on the result import() the code you need guys? |
Without breaking TypeScript support? I don't think so. If you have time to experiment with it, creating compatibility for Vue 2 and Vue 3 together, feel free to do so 🙂 But in the (very) long-term this is irrelevant, as support for Vue 2 will one day be discontinued |
I'm also interested in a cleaner approach for this versioning. |
Hi guys, why dont put on the README.MD this important info: |
@KhozmoS ... it is on the readme... Oh, and beside that it's already there: this is an Open Source project, so you can create PRs for it, also for |
@Shinigami92 really don't know how I didn't see that... my bad 👌 |
We could try https://github.com/vueuse/vue-demi 🤔 |
When connecting to an application on Vue 2, an error occurs Uncaught TypeError: Cannot set property '$ gtm' of undefined due to the fact that the plugin is connected via Vue.config.globalProperties, and this is possible only in Vue 3
Installed simply through npm without specifying additional tags
The text was updated successfully, but these errors were encountered: