Closed seba4 closed 2 years ago
Sounds to me like the "submodule" also has a node_modules folder, in which a wrong Version of Vue is installed (Vue 2 still?), or something like that.
I did a bit more testing. And yea i have checked about this node_modules but no this is not there. Otherwise app is working if i open it in browser but not in Jest tests.
One finding that i noticed:
Project structure: /root
client/Test.vue
If this Test.vue is loaded from within same client/VueApp1 folder structure then it works. If i load it from some other folder then i get an error. Import example: Import Test from '/root/client/Test.vue'
I found out that the problem was in node_modules like you said, but it was not in same location but 2 levels up. This folder included different Vue version and because of that i had problems.
In my project i have just upgraded to Vue 3 and app is running normally but when i try to run tests i get error:
Component Test.vue) Example1:
Component Test.vue Example2:
I am shallowMounting/mount OverviewOption.vue which has imported Test.vue.
createVNode is not a function
ERROR2 (3.2.19 Vue):_vue.createElementVNode) is not a function
Only difference in OverviewOption.vue: import Test from 'design-system/components/Test/Test.vue' import Test from './Test.vue'
Any idea where the problem is or what should i check?