chartjs / chartjs/Chart.js

VueJS Yarn build failed with error Command failed with exit code 1.

Open
#11,506 0 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Expected behavior

It should be build success, error detail in Current behavior session

### Current behavior

I'm currently using chart.js in project with vuejs

Version using in package.json:
"chart.js": "3.9.1",
"chartjs-plugin-datalabels": "^2.2.0",
"chartjs-plugin-labels": "^1.1.0",
"vue-chartjs": "4.1.2",

Everything work fine when yarn.serve, but when I want to publish project or run command 'yarn build' to test if it build success, it return error:
D:/THS/source/repos/epad1/Source/WebSite/EPAD_BackendCore/EPAD_Backend_Core/EPAD_Backend_Core/epad/node_modules/chart.js/types/adapters.d.ts(1,13):
1:13 '=' expected.
> 1 | import type { ChartOptions } from './index.esm';
| ^
2 |
3 | export type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
4 |

error in D:/THS/source/repos/epad1/Source/WebSite/EPAD_BackendCore/EPAD_Backend_Core/EPAD_Backend_Core/epad/node_modules/chart.js/types/adapters.d.ts

ERROR in D:/THS/source/repos/epad1/Source/WebSite/EPAD_BackendCore/EPAD_Backend_Core/EPAD_Backend_Core/epad/node_modules/chart.js/types/adapters.d.ts(1,35):
1:35 ';' expected.
> 1 | import type { ChartOptions } from './index.esm';
| ^
2 |
3 | export type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
4 |

I already try run 'yarn install' then 'yarn build' again, and version v3.9.1 is the only version work fine when run command 'yarn serve', just cause error when 'yarn build'; other version can't even run when 'yarn serve'

### Reproducible sample

https://codepen.io/leelenaleee/pen/WNyJXEe

### Optional extra steps/info to reproduce

_No response_

### Possible solution

_No response_

### Context

_No response_

### chart.js version

v3.9.1

### Browser name and version

_No response_

### Link to your project

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.