react-c3js icon indicating copy to clipboard operation
react-c3js copied to clipboard

Issue after deploy on heroku

Open viniciusolima opened this issue 5 years ago • 2 comments

Works fine on development, but after deployed on heroku, charts doesnt open. Im getting the error

c3.js:1046 Uncaught TypeError: n is not a function
    at new a (c3.js:1046)
    at new r (c3.js:1026)
    at Object.Y.generate (c3.js:1055)
    at t.value (react-c3js.js:69)
    at t.value (react-c3js.js:85)
    at t.value (react-c3js.js:44)
    at commitLifeCycles (react-dom.production.min.js:148)
    at t (react-dom.production.min.js:157)
    at b (react-dom.production.min.js:168)
    at v (react-dom.production.min.js:167)

viniciusolima avatar May 02 '19 21:05 viniciusolima

Exactly same problem here! Any solutions?

martinsnajdr avatar Jun 28 '19 12:06 martinsnajdr

We've run into this issue, think its to do with the require in componentDidMount which worked fine in development but not in production because of our setup

https://github.com/bcbcarl/reactc3js/blob/89fb042d5e582dca14e04a17e7690a2524fe0f7d/src/index.js#L48

componentDidMount() {
    c3 = require('c3');
    this.updateChart(this.props);
  }

madwire avatar Jul 10 '19 11:07 madwire