Skip to content
This repository has been archived by the owner on Nov 18, 2018. It is now read-only.

Got TypeError: Cannot read property 'any' of undefined ./node_modules/re-bulma/lib-es/grid/columns.js:25 #93

Open
azulkipli opened this issue Nov 8, 2017 · 4 comments

Comments

@azulkipli
Copy link

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

screen shot 2017-11-08 at 18 21 33

@Vortelf
Copy link

Vortelf commented Nov 13, 2017

I'm getting error at the same place but the error is TypeError: __WEBPACK_IMPORTED_MODULE_0_react__.PropTypes is undefined

Using React@16.1.0 re-bulma@0.4.6
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>
    );
  }
}

@panbhatt
Copy link

panbhatt commented Jan 3, 2018

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.

@nick264
Copy link
Contributor

nick264 commented May 9, 2018

My pull request solves this, I think: #97 . Lmk if you have feedback.

@nick264
Copy link
Contributor

nick264 commented May 10, 2018

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:
screen shot 2018-05-10 at 9 27 26 am

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants