-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for New Versions of React #28
Comments
@talyssonoc I am running into the same problem. Seems that this will require an update on the dist. |
As @talyssonoc commented, it's an issue with outdated module distribution. Release Until new release, you can install the module directly from github with
and then use it with the following import statement import { InlineMath } from "react-katex/dist/react-katex"; |
You mean this error?? :
|
@sjorsvanheuveln, yes. That's the error you gonna see after starting react app. |
New version released. |
In package.json I do have
"katex": "^0.9.0-beta","react": "^16.2.0", "react-katex": "^1.2.0",
When importing:
import { BlockMath } from 'react-katex';
I get the error Uncaught TypeError: Cannot read property 'string' of undefined at Object. (bundle.js:65414) at webpack_require (bundle.js:65334) at Object. (bundle.js:65367) at webpack_require (bundle.js:65334) at bundle.js:65354 at bundle.js:65357 at webpackUniversalModuleDefinition (bundle.js:65307) at Object. (bundle.js:65314) at webpack_require (bundle.js:20) at Object.defineProperty.value
Along with warnings when building:
npm install --save react-katex npm WARN react-katex@1.2.0 requires a peer of katex@^0.7.0 but none is installed. You must install peer dependencies yourself. npm WARN react-katex@1.2.0 requires a peer of react@^15.3.2 but none is installed. You must install peer dependencies yourself. npm WARN react-latex@1.0.1 requires a peer of react@^15.3.0 but none is installed. You must install peer dependencies yourself.
So it seems a bit odd this maybe is the newer version of React supported?
I did try this which maybe related by installing prop types but didnt seem to make a difference installing that.
Setting the versions to this solves the problem:
Removing the warnings has worked so setting the values to:
"react-katex": "1.2.0",
"katex": "^0.7.0",
"react": "15.3.2",
The text was updated successfully, but these errors were encountered: