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.

Not working with next.js

See original GitHub issue

Expected Behaviour

I was trying to run this example: https://github.com/tobiaslins/frappe-charts-react-example with next.js.

Actual Behaviour


_frappeCharts2.default is not a constructor
TypeError: _frappeCharts2.default is not a constructor
    at Chart.componentDidMount (http://localhost:3000/_next/1510152164727/page/:45412:19)
    at Chart.proxiedComponentDidMount (http://localhost:3000/_next/1510152164727/main.js:16882:40)
    at commitLifeCycles (http://localhost:3000/_next/1510152164727/commons.js:11511:24)
    at commitAllLifeCycles (http://localhost:3000/_next/1510152164727/commons.js:12300:9)
    at HTMLUnknownElement.callCallback (http://localhost:3000/_next/1510152164727/commons.js:1305:14)
    at Object.invokeGuardedCallbackDev (http://localhost:3000/_next/1510152164727/commons.js:1344:16)
    at invokeGuardedCallback (http://localhost:3000/_next/1510152164727/commons.js:1201:27)
    at commitAllWork (http://localhost:3000/_next/1510152164727/commons.js:12421:9)
    at workLoop (http://localhost:3000/_next/1510152164727/commons.js:12693:13)
    at HTMLUnknownElement.callCallback (http://localhost:3000/_next/1510152164727/commons.js:1305:14)

https://github.com/ronihcohen/frappe-charts-next-example

Frappé Charts version:

^0.0.4

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ideashowercommented, Aug 10, 2020

@arangates I was able to get this to work by specifying a relative path (see: https://github.com/vercel/next.js/issues/883).

ie ../node_modules/frappe-charts/dist/frappe-charts.min.esm

0reactions
arangatescommented, Aug 5, 2020

Still exists

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Tailwindcss not working with next.js; what is wrong ...
In my case, I had set up the Tailwind config file correctly, but tailwind styles were not applying. Deleting the .next folder and...
Read more >
TailwindCSS not working in NX NextJS project. #8355 - GitHub
Current Behavior Following the egghead tutorial for a NextJS project with a new nx-workspace, installing Tailwind is not working.
Read more >
Debugging Tailwind CSS and Next.js - LogRocket Blog
Using Tailwind CSS and Next.js together can be a powerful match, sometimes a few bugs get in the way. Learn to fix them...
Read more >
next.config.js: Introduction
next.config.js is a regular Node.js module, not a JSON file. It gets used by the Next.js server and build phases, and it's not...
Read more >
Advanced Features: Error Handling - Next.js
Handling Errors in Development ... When there is a runtime error during the development phase of your Next.js application, you will encounter an...
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