Closed simevo closed 6 months ago
Is this issue still valid? I've seen some issues with vite compiler and Chart.js, could this be the case?
My time with my open source projects has been very limited lately, so trying to catch up.
thanks for your time! this is obscure and low priority ...
anyway I have updated all dependencies in the vue-3-vitest-basic-example
repo, and the error still comes up; somehow at some point it gets to here with the arg
variable undefined
The problem is still valid. Used the plugin in our project, but it broke a (vitest) test. Also I am not able to test our sankey component due to the error:
TypeError: Cannot read properties of undefined (reading 'prototype')
at TypedRegistry.isForType (file:///C:/Users/.../app/node_modules/chart.js/src/core/core.typedRegistry.js:17:74)
at Registry._getRegistryForType (file:///C:/Users/.../app/node_modules/chart.js/src/core/core.registry.js:164:15)
at forEach (file:///C:/Users/.../app/node_modules/chart.js/src/core/core.registry.js:126:41)
at Array.forEach (
It looks like #105 released with v0.12.1 fixed this. Thanks!
We have a setup where this component is used inside a Vue 3 app, which is tested with jest (works fine!).
We are now moving to the latest vue tooling, and after porting the tests from jest to vitest, we get this error:
it occurs in
src/components/SankeyChart.vue
on this line:I have set up a super-simple example to reproduce (https://gitlab.com/simevo/vue-3-vitest-basic-example), starting from the basic vue test example, I added
chart.js
andChart.register(LinearScale)
(works fine)As soon as I import
import { SankeyController, Flow } from 'chartjs-chart-sankey'
and changeChart.register(LinearScale)
toChart.register(LinearScale, SankeyController, Flow)
the error pops up.Sorry for the convoluted use case, I just hope this helps you find some hidden bug in your nice module!