Skip to content
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

Error using with webpack #182

Open
GDX64 opened this issue Apr 10, 2023 · 4 comments
Open

Error using with webpack #182

GDX64 opened this issue Apr 10, 2023 · 4 comments

Comments

@GDX64
Copy link

GDX64 commented Apr 10, 2023

image

I'm trying to register it like this

import { Chart, registerables } from 'chart.js';
import { TreemapController, TreemapElement } from 'chartjs-chart-treemap';

Chart.register(...registerables, TreemapController, TreemapElement);

With vite it goes just fine, but when using webpack, I get this error. I'm on version 2.30 of the threemap and 4.2 of chart.js. It looks like the threemap module does not find the main chart.js module.

@54mu3l
Copy link

54mu3l commented Jul 12, 2023

Same here.

After upgrading webpack 4.x to 5.x I get the following error:

App •  ERROR  •  UI  in ./node_modules/chartjs-chart-treemap/dist/chartjs-chart-treemap.esm.js

Module not found: Can't resolve imported dependency "chart.js/helpers"
Did you forget to install it? You can run: yarn add chart.js/helpers

Upgrading to Chart.js 4.x fixed the problem for me...

@dcworldwide
Copy link

How to get this working with 3.x?

@hbracy
Copy link

hbracy commented Nov 8, 2023

+1 Same issue on Chart.js 3.9

@akinorew
Copy link

+1 Same issue with "chart.js": "^4.2.1" and "chartjs-chart-treemap": "^2.3.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants