Open romanown opened 1 year ago
Same for Angular Setup with Nx and Cypress
Module parse failed: Unexpected token (567:17)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| };
| class DatasetController {
> static defaults = {};
| static datasetElementType = null;
| static dataElementType = null;
I temporarily solved the problem by downgrading the version to 3.9.1. I hope the developers will soon pay attention to this problem and fix it.
@romanown the code that we have is valid JavaScript. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static
I think you need to configure Webpack/Babel per https://stackoverflow.com/questions/64928312/webpack-static-field
thnks. i use the Symfony and can not configure thw webpack separately
before I installed this library, everything worked fine. the problem is in this library or in its compatibility, or a newer version of the webpack or babel is needed
Currently, I'm using chart.js 3.9.1.I want to upgrade the version 4.3.0 for new features. Getting below error while updating 4.3.0 then run the vue2 project. (https://i.stack.imgur.com/fZHs1.png).Give me proper solution.
Same for React: 17 Chart.js: 4.4.0 webpack: 4.46.0
any update? still issue in react 18, chartjs v4, in cra
For those of you in a position to change your webpack/babel config you'll need to ensure chart.js is pushed through babel-loader and that you are using @babel/plugin-transform-class-properties, either directly or via @babel/preset-env.
thanks. i use symfony encore with "@babel/plugin-proposal-class-properties": "^7.17.12", "@babel/preset-react": "^7.17.12",
Expected behavior
i create test app on codepen it work. but localy on symfony i have error
Current behavior
after first install by npm and run watch an symfony i have Module parse failed: Unexpected token (567:17) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. class DatasetController {
Reproducible sample
can not
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
No response
chart.js version
4.3.0
Browser name and version
No response
Link to your project
No response