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 in ../../node_modules/chartjs-plugin-zoom/dist/chartjs-plugin-zoom.esm.js 327:2-10 export 'callback' (imported as 'callback') was not found in 'chart.js/helpers' (module has no exports)

See original GitHub issue

Expected behavior

Versions used package.json:

“chart.js”: “^3.8.0”, “chartjs-plugin-zoom”: “1.0.1”, “react-chartjs-2”: “^4.0.0”,

No errors

Current behavior

export 'callback' (imported as 'callback') was not found in 'chart.js/helpers' (module has no exports)
 @ ./src/resources/subscription_mgmt/SubscriptionCreditsUsage.tsx 16:0-45 19:94-104
 @ ./src/resources/subscription_mgmt/index.ts 3:0-65 7:15-38
 @ ./src/resources/index.ts 16:0-52 17:0-155
 @ ./src/App.tsx 16:0-39 97:11-19
 @ ./src/index.tsx 8:0-24 10:38-41
ERROR in ../../node_modules/chartjs-plugin-zoom/dist/chartjs-plugin-zoom.esm.js 368:2-6
export 'each' (imported as 'each') was not found in 'chart.js/helpers' (module has no exports)
 @ ./src/resources/subscription_mgmt/SubscriptionCreditsUsage.tsx 16:0-45 19:94-104
 @ ./src/resources/subscription_mgmt/index.ts 3:0-65 7:15-38
 @ ./src/resources/index.ts 16:0-52 17:0-155
 @ ./src/App.tsx 16:0-39 97:11-19
 @ ./src/index.tsx 8:0-24 10:38-41
ERROR in ../../node_modules/chartjs-plugin-zoom/dist/chartjs-plugin-zoom.esm.js 376:2-10
export 'callback' (imported as 'callback') was not found in 'chart.js/helpers' (module has no exports)
 @ ./src/resources/subscription_mgmt/SubscriptionCreditsUsage.tsx 16:0-45 19:94-104
 @ ./src/resources/subscription_mgmt/index.ts 3:0-65 7:15-38
 @ ./src/resources/index.ts 16:0-52 17:0-155
 @ ./src/App.tsx 16:0-39 97:11-19
 @ ./src/index.tsx 8:0-24 10:38-41
ERROR in ../../node_modules/chartjs-plugin-zoom/dist/chartjs-plugin-zoom.esm.js 404:2-6
export 'each' (imported as 'each') was not found in 'chart.js/helpers' (module has no exports)

Module not found: Error: Can't resolve '../dist/helpers.esm' in node_modules/chart.js/helpers'
Did you mean 'helpers.esm.js'?

Reproducible sample

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

v3.8.0

Browser name and version

Chrome

Link to your project

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
mlandalvcommented, Aug 2, 2022

I think the problem is that chart.js/helpers/helpers.mjs is missing .js in the export path.

Should be.

export * from '../dist/helpers.esm.js';
1reaction
etimbergcommented, Aug 2, 2022

There was a bug with 3.8.1 that was resolved in 3.8.2. See #10513 for the fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chart v4 : Module not found: Error: Package path . is not ...
I looked at node_modules/chart.js/package.json file and there is a well defined set of exports there. But as it came with the upgrade and...
Read more >
Callback Hell
Callback Hell. A guide to writing asynchronous JavaScript programs. What is "callback hell"? Asynchronous JavaScript, or JavaScript that uses callbacks, ...
Read more >
Your Guide to React.useCallback()
A functional component wrapped inside React.memo() accepts a function object prop; When the function object is a dependency to other hooks, e.g. ...
Read more >
Working with Callbacks
This page explains how to interface your code with existing callback APIs and libraries you're using. We'll see that making bluebird work with...
Read more >
Python callback
The callback function associated with the "application closed" event must not take any parameters. All other callback functions must receive a single parameter ......
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