carbon-design-system / carbon-components-vue

Vue implementation of the Carbon Design System
http://vue.carbondesignsystem.com
Apache License 2.0
609 stars 179 forks source link

Bug when loading cvdropdown #492

Closed vykimo closed 5 years ago

vykimo commented 5 years ago

Hi, when I try to load the library on my Vue code like this :

import CarbonComponentsVue from '@carbon/vue/src/index';
Vue.use(CarbonComponentsVue);

I get this when it comes to load : [1] * ./_cv-dropdown-inner in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/@carbon/vue/src/components/cv-dropdown/cv-dropdown.vue?vue&type=script&lang=js& [1] * ./_cv-dropdown-inner-c10 in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/@carbon/vue/src/components/cv-dropdown/cv-dropdown.vue?vue&type=script&lang=js&

CvDropdown element seems to be broken...

"@carbon/vue": "^2.12.0"

lee-chase commented 5 years ago

Please check that node_modules/@carbon/vue has updated as the internal _cv-dropdown-inner-c10 became the standard cv-dropdown in version 2.2.0 of @carbon/vue.

vykimo commented 5 years ago

What do you mean? I can't understand you. I must use this balise, isn't it ? <cv-dropdown>

lee-chase commented 5 years ago

The error above refers to _cv-dropdown-inner-c10 but that does not exist in v2.12.0

Try removing and adding @carbon/vue from node_modules.

If this does not resolve the issue can you post example component usage here, on codepen, github or similar.

vykimo commented 5 years ago

Yes it fixed it partially because now I get error in console :

[Vue warn]: Unknown custom element: <cv-dropdown> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
lee-chase commented 5 years ago

Thank you, just spotted that the component is misnamed. I will update shortly to 2.12.1 and post here when done.

vykimo commented 5 years ago

Thank you for the fix ! Have a good day

lee-chase commented 5 years ago

@vykimo update published please confirm and close if issue resolved.

vykimo commented 5 years ago

Seems its still not ok.. same problem in console with "@carbon/vue@2.12.1"

lee-chase commented 5 years ago

Could you post a minimal sample on github or code sandbox?

Will try to debug.

vykimo commented 5 years ago

I deleted nodes modules and it works now. thanks!