Closed alukos closed 4 years ago
Can't run from /docsrc
yarn dev
[Vue warn]: Unknown custom element: <D3SlopeChart> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <SlopeChartExampleDataUpdate> at src/components/examples/SlopeChartExampleDataUpdate.vue
<HomeView> at src/views/Home.vue
<App> at src/App.vue
<Root>
warn @ vue.runtime.esm.js?2b0e:619
...
Sorry, I hadn't updated the npm repository yet. Try installing it again now
Thank you!
Now docsrc
works perfectly
➜ docsrc git:(master) ✗ npm list | grep vue-d3-charts
docs@0.1.0 /home/alukos/Projects/sandbox/vue/vue-d3-charts/docsrc
├─┬ vue-d3-charts@0.2.1
But nothing has changed in my nuxt app after reinstalling the module index.vue:
<template>
<D3BarChart :config="config" :datum="data"></D3BarChart>
</template>
<script>
import { D3BarChart } from 'vue-d3-charts'
export default {
components: { D3BarChart },
...
npm list | grep vue-d3-charts
...
├─┬ vue-d3-charts@0.2.1
yarn dev
...
"export 'D3BarChart' was not found in 'vue-d3-charts'
Ok, I've implemented vue-sfc-rollup instead of rollup.js and all seem to be fine now.
Check it out in version 0.2.3
As you said, also define the chart in components:
import { D3BarChart } from 'vue-d3-charts';
export default {
name: 'LoremIpsumComponent',
components: {
D3BarChart,
},
// ...
};
App.vue
Received: export 'D3BarChart' was not found in 'vue-d3-charts'