nicgirault/circosJS

Problem instantiating Circos in ES6

Closed this issue · 3 comments

Hi @nicgirault ,

Thank you for your response in the earlier issue. I really appreciate that you spend your time on the problem.

I've tried re-installing circos using

npm remove circos && npm install circos@2.0.7

and importing and instantiating it as per the suggestion by @ferrantejake in #38

import * as Circos from 'circos';

class Chart extends Component {
  render() {
    let myCircos = Circos({
      width: 700,
      height: 700,
      container: 'lineChart',
      defaultTrackWidth: 10
    });
    return (<div id="lineChart"/>);
  }
}

but still getting the same error:

TypeError: __WEBPACK_IMPORTED_MODULE_2_circos__ is not a function

What did I miss?

Thank you.

@imranariffin it's stranged. I tried your snippet and I don't get an error. I'm used to use npm uninstall instead of npm remove. Is it the same?

Can you provide all the error stack please?

And by the way you can just use import Circos from 'circos'. No need of the star

Ok, now it no longer gives me the error. I didn't do anything other than npm remove circos && npm install circos@2.0.7 and then npm start .
Most probably your solution was correct, @nicgirault , just that I need to add npm start. Last night when I tried your solution I didn't do npm start

Thank you very much, @nicgirault and @ferrantejake for being very helpful to and patient with me! Really appreciate the help! :D :D :D 👍