Skip to content
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

Uncaught TypeError: Cannot read property '_currentElement' of null #128

Closed
ziweizhou opened this issue Apr 16, 2015 · 8 comments
Closed
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet

Comments

@ziweizhou
Copy link

Hello

Not sure why I am getting this error message when I try to create a simple Select

var Select = require("react-select");
var TaskList = React.createClass({
  render: function() {
    return (
      <div>
            <Select multi={false} placeholder={'Select your favourite(s)'}
              value={'AL'}
              options={[{ value: 'AL', label: 'Alabama' }]}
          />
          </div>

    );
  }
});

error message
Uncaught TypeError: Cannot read property '_currentElement' of null

Thanks

@vsobotka
Copy link

I have the exact same issue. Did you resolve it?

@vsobotka
Copy link

Hi, so I took a look at it a bit more and I found out, that the problem was (in my case) in gulpfile.js. To be specific, the debowerify transform for browserify. After deleting it, everything works fine. Hope this will help.

@dcousens
Copy link
Collaborator

dcousens commented May 7, 2015

@ZaphyrVonGenevese are you talking about your own gulpfile.js?
In which case, should I close this issue?

@dcousens dcousens added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label May 7, 2015
@vsobotka
Copy link

vsobotka commented May 8, 2015

@dcousens Yes, I am talking about my own gulpfile.js. For me, feel free to close it.

@dcousens dcousens closed this as completed May 9, 2015
@JohnMorales
Copy link

I'm assuming that it has something to do with somehow bringing in an older version of react.

I was having the same error message, in my case I was depending on browserify's reactify transform and letting that dependency bring in react as needed.

The fix was explicitly depending on react >= 0.12 in my dev-dependencies got rid of the error.

It might sense to add a note in the README for people that bump into this one. The fix is easy, but it's not clear what to do or why when you get this error.

@adampatterson
Copy link

So what was the cause? I have the same issue and in searching for a solution other people were saying that it had to do with multiple different things. In my case I changed componentDidMount tocomponentWillMount

@ongmin
Copy link

ongmin commented Jan 14, 2016

@ any updates?

@Pines-Cheng
Copy link

what was the cause?has any one know?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet
Projects
None yet
Development

No branches or pull requests

7 participants