-
Notifications
You must be signed in to change notification settings - Fork 23
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
vite vue ts build errors #33
Comments
I will take a look at this week and get back with an answer. Thanks, |
I have been following your steps and it works fine for me, I could not reproduce your error, build & dev works fine. Here are my dependencies:
My app:
and the chart:
can you try again and make sure you have the latest vue3-charts version. Thanks, |
Hello Alexandru! your example works alright. But if I want to integrate it in to my app it fails to build again. every else is ident with yours |
I was running into the same issue. Looks like the generated types keep the See this issue describing the problem and the workaround - ezolenko/rollup-plugin-typescript2#201 |
Hello Ghiura Alexandru!
could you please support vite with vue ts - because thats the recommended way to start a vue3 project now.
It works fine with development server (npm run dev) but can't build it:
If you make a brand new vite vue ts project like so:
ralph@centauri:~/testspace$ npm create vite@latest my-vue-app --template vue
Need to install the following packages:
create-vite@latest
Ok to proceed? (y) y
✔ Select a framework: › vue
✔ Select a variant: › vue-ts
Scaffolding project in /home/ralph/testspace/my-vue-app...
Done. Now run:
cd my-vue-app
npm install
npm run dev
And then add your example "Linechart.vue" from your website, plug it in the Helloworld.vue and compile it like this:
ralph@centauri:~/testspace/my-vue-app$ npm run build
node_modules/vue3-charts/dist/components/Chart/index.vue.d.ts:1:71 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
1 import { ChartAxis, ChartConfig, Data, Direction, Margin, Size } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/components/Layer/index.vue.d.ts:1:27 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
1 import { LayerType } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/components/Line/index.vue.d.ts:1:23 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
1 import { Point } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/components/Treemap/index.vue.d.ts:1:30 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
1 import { Margin, Size } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/hooks/useBars.d.ts:2:27 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
2 import { Rectangle } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/hooks/useChart.d.ts:1:23 - error TS2307: Cannot find module '@/models' or its corresponding type declarations.
1 import { Chart } from '@/models';
~~~~~~~~~~
node_modules/vue3-charts/dist/hooks/usePoints.d.ts:2:23 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
2 import { Point } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/types/index.d.ts:1:27 - error TS7016: Could not find a declaration file for module 'd3-axis'. '/home/ralph/testspace/my-vue-app/node_modules/d3-axis/src/index.js' implicitly has an 'any' type.
Try
npm i --save-dev @types/d3-axis
if it exists or add a new declaration (.d.ts) file containingdeclare module 'd3-axis';
1 import type { Axis } from 'd3-axis';
~~~~~~~~~
node_modules/vue3-charts/dist/types/index.d.ts:2:29 - error TS7016: Could not find a declaration file for module 'd3-shape'. '/home/ralph/testspace/my-vue-app/node_modules/d3-shape/src/index.js' implicitly has an 'any' type.
Try
npm i --save-dev @types/d3-shape
if it exists or add a new declaration (.d.ts) file containingdeclare module 'd3-shape';
2 import { PieArcDatum } from 'd3-shape';
~~~~~~~~~~
Found 9 errors in 8 files.
Errors Files
1 node_modules/vue3-charts/dist/components/Chart/index.vue.d.ts:1
1 node_modules/vue3-charts/dist/components/Layer/index.vue.d.ts:1
1 node_modules/vue3-charts/dist/components/Line/index.vue.d.ts:1
1 node_modules/vue3-charts/dist/components/Treemap/index.vue.d.ts:1
1 node_modules/vue3-charts/dist/hooks/useBars.d.ts:2
1 node_modules/vue3-charts/dist/hooks/useChart.d.ts:1
1 node_modules/vue3-charts/dist/hooks/usePoints.d.ts:2
2 node_modules/vue3-charts/dist/types/index.d.ts:1
The text was updated successfully, but these errors were encountered: