Skip to content
Advertisement

Chart.js Error: You may need an appropriate loader to handle this file type

I’m currently attempting to use Chart.js within my react application but when I go to build my application I’m presented with this error

JavaScript

I tried researching online to see if anyone else has had the same issue, but I had no luck.

Below is my Webpack config file:

JavaScript

And here is my bablerc file

JavaScript

This is the list of my dependencies that are installed

JavaScript

I expected the error to tell me what loader I needed to install to use with Chart.js but it does not specify. If anyone knows which loader I need to install and where I should put it in my files that would be awesome. TIA!

Advertisement

Answer

Chart.js version 3 is not compatible. Change it to ^2.9.4. The same problem as you and I have been solved.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement