Skip to content

TypeError: Cannot read property 'makeMathField' of undefined #39

Open

Description

@shundaime

I was trying to use your package the simple way as i could with this part of code to start :

render() {
  return <MathfieldComponent
    initialLatex="f(x)=\\log _10 x"
    onChange={this.onMathChange}
  />;
}

onMathChange(mathText) {
  console.log(mathText);
}

But i get this :
Capture d’écran du 2021-08-27 09-57-13

I don't understand why, can you help please ?

Activity

  1. joaortizro commented on Aug 30, 2021

    @joaortizro

    Hello this is due to some webpack configurations, see arnog/mathlive#1123

  2. shundaime commented on Sep 2, 2021

    @shundaime
    Author

    Hello we are not using webpack, this is react standalone

  3. arnog commented on Sep 2, 2021

    @arnog

    This is not specifically a problem with webpack. In the case of the react toolchain, there is an intermediary tool (whose name I forget) that doesn't know how to parse optional chaining. Anyhoo... The latest version of Mathlive has reverted to not using optional chaining to accommodate those toolchains.

  4. shundaime commented on Sep 6, 2021

    @shundaime
    Author

    Hello, what is for you the latest version of Mathlive ?
    Here is our : "react-mathlive": "^3.0.5-preview.1",

  5. reinvanimschoot commented on Sep 27, 2021

    @reinvanimschoot

    @arnog We tried updating to the latest version of react-mathlive and mathlive but we still get the same error. Are we missing something? Cheers!

  6. arnog commented on Sep 27, 2021

    @arnog

    Which version of MathLive are you using?

  7. reinvanimschoot commented on Sep 28, 2021

    @reinvanimschoot

    @arnog 0.59.0

  8. arnog commented on Sep 28, 2021

    @arnog

    That's the problem. The current version is 0.69.7.

  9. reinvanimschoot commented on Sep 29, 2021

    @reinvanimschoot

    I upgraded to 0.69.7 but I still get this error

    Cannot read property 'makeMathField' of undefined
    
  10. reinvanimschoot commented on Oct 8, 2021

    @reinvanimschoot

    Is it possible that react-mathlive is not compatible with the latest version of mathlive?

  11. dobesv commented on Oct 15, 2021

    @dobesv

    I have the same issue. Any idea which version of mathlive can be used with react-mathlive?

    $ grep mathlive package.json
        "mathlive": "^0.69.7",
        "react-mathlive": "^3.0.5-preview.1",
    
  12. dobesv commented on Oct 22, 2021

    @dobesv

    I wonder if this is a duplicate of #34

  13. yurnery commented on Dec 3, 2021

    @yurnery

    any solutions?

  14. dobesv commented on Dec 3, 2021

    @dobesv

    Just have you make your own mathlive react component, it's not that hard to do TBH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions