re-bulma
re-bulma copied to clipboard
Got TypeError: Cannot read property 'any' of undefined ./node_modules/re-bulma/lib-es/grid/columns.js:25
Hi, when trying install re-bulma based on this instruction (using create-react-app which is already use react version 16.0.0),
https://github.com/bokuweb/re-bulma#install
I put these on index.js
import insertCss from "insert-css";
import css from "re-bulma/build/css";
try {
if (typeof document !== "undefined" || document !== null) insertCss(css, { prepend: true });
} catch (e) {}
but after that, I got this error
TypeError: Cannot read property 'any' of undefined ./node_modules/re-bulma/lib-es/grid/columns.js:25
any clue how to solve this issue?
Thank you
I'm getting error at the same place but the error is TypeError: __WEBPACK_IMPORTED_MODULE_0_react__.PropTypes is undefined
Using [email protected] [email protected] Code I'm using is
import { Container, Column, Columns } from 're-bulma';
class App extends Component {
render() {
return (
<Container>
<Columns>
<Column>
<NavLink className="button" activeClassName="active" exact to="/">
Something List
</NavLink>
</Column>
<Column>
<NavLink className="button" activeClassName="active" exact to="/something/new">
Add Something
</NavLink>
</Column>
</Columns>
<Route exact path="/" component={SomethingPage}/>
<Route path="/something/new" component={SomethingFormPage}/>
<Route path="/something/edit/:_id" component={SomethingFormPage}/>
</Container>
);
}
}
I think this is expected, since the React PropTypes has been moved to a different package (not backward compatible and this still uses React < 16.0.0). Need a PR to solve this.
My pull request solves this, I think: #97 . Lmk if you have feedback.
Since this project isn't being maintained, I'm not sure this pull request will be merged - and even if it is, this is probably not a package to rely on unless someone else takes over.
If it's helpful for others, we've temporarily solved the problem by including a dependency directly from the patched version:
In the medium term we're moving to semantic-ui-react (though there are other bulma-based react packages you could migrate to, e.g. https://github.com/couds/react-bulma-components).