question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error running the latest chartjs-plugin-datalabels with NextJS

See original GitHub issue

Hello,

I am developing a NextJS site and I installed the latest “chartjs-plugin-datalabels”.

When I am running my project I got the following error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './helpers' is not defined by "exports" in /Users/zaralisandreas/Desktop/Projects/odify/node_modules/chart.js/package.json

I am using Node v18.12.1 and Chart.js 4.0.1.

Any ideas?

I really appreciate any help you can provide.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:10
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
stockiNailcommented, Dec 12, 2022

@simonbrunel I think the plugin must be defined as “module” and defines the exports. See https://github.com/chartjs/chartjs-plugin-annotation/pull/815 and other plugins (gradient https://github.com/kurkle/chartjs-plugin-gradient/blob/master/package.json)

2reactions
simonbrunelcommented, Dec 19, 2022

That’s a good news! Thanks @Fish1 and @DecadentIpsum for checking and keep us updated.

@dqve @ignaciodiazb @NotTimTam @epleaner @dahsser can you guys also confirm that Chart 4.1.1 fixes your issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · chartjs/chartjs-plugin-datalabels - GitHub
Chart.js plugin to display labels on data elements - Issues ... Error running the latest chartjs-plugin-datalabels with NextJS.
Read more >
chart.js - problem with label on the right hand
I use the plugin chartjs-plugin-datalabels it work but the first label is hidden. Do you know how to fix this? https://jsfiddle.net/rq78pg4j/1/
Read more >
chartjs-plugin-datalabels
Flexible. Compatible with all types of charts (bar, line, doughnut, radar, etc.) ; Customizable. Appearance and position of each label are fully and...
Read more >
1. How to add chartjs-plugin-datalabels to Chart.JS - YouTube
jsIn this video we will explore how to add the chartjs plugin datalabels in Chart.JS. We will be using the ch...
Read more >
Integration | Chart.js
js can be integrated with plain JavaScript or with different module loaders. The examples below show how to load Chart.js in different systems....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found