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

React 16.0 + PropTypes Issue #143

Open
kevinguard opened this issue Nov 4, 2017 · 30 comments
Open

React 16.0 + PropTypes Issue #143

kevinguard opened this issue Nov 4, 2017 · 30 comments

Comments

@kevinguard
Copy link

Having react and react-dom upgraded to 16, I am getting the following error which I suspect relates to the new way one need to declare pros types using PropTypes. I think this repo has already upgraded to use new format of PropTypes but I'm not clear why still seeing this error!

react-bootstrap-date-picker/lib/index.js:117
    selectedDate: _react2.default.PropTypes.object,
                                           ^
TypeError: Cannot read property 'object' of undefined
    at Object.<anonymous> (../node_modules/react-bootstrap-date-picker/lib/index.js:117:44)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
@kevinguard
Copy link
Author

Issue is temporarily fixed by doing:

"react-bootstrap-date-picker": "github:pushtell/react-bootstrap-date-picker#f622dc8872dd180324ba5d3c295d009848f5814b",

but I wonder if this is sustainable. Can we get a version bump wherein we have the latest commits?

@Quancom
Copy link

Quancom commented Nov 13, 2017

+1 for version bump with latest in master f622dc8

@Tomekmularczyk
Copy link

Please. Do. Version bump.

@thefivetoes
Copy link

Hello, curious if there is anything I can do to help get this update released to NPM? Is the release blocked bc there is a manual testing step that needs to occur? I would be happy to test and document the results if that helps the maintainers get the release out. Thanks! 👋

@python273
Copy link

@wehriam bump

@joshuanutmeg
Copy link

bumpy bump bump bump!

@diegoNutmeg
Copy link

bump in NPN please.

@maxaggedon
Copy link

Even when I resolve the package directly from github I get an error and I have to install the create-react-class module in my project in order for react-bootstrap-date-picker to work... Anyone experiencing this issue as well ?

@DaemonAlchemist
Copy link

For those who still need a published NPM package in the meantime: https://www.npmjs.com/package/react-16-bootstrap-date-picker

@Siyfion
Copy link

Siyfion commented Dec 15, 2017

@pushtell We really need a version bump in NPM 🙏

@joshuanutmeg
Copy link

@Siyfion just use the one published by @DaemonAlchemist in the comment before - simple 😝

@Siyfion
Copy link

Siyfion commented Dec 18, 2017

@joshuanutmeg I get the following error with that version:

./node_modules/react-16-bootstrap-date-picker/lib/index.js
Module not found: Can't resolve 'create-react-class' in '/Users/siyfion/Git/labellogiclive_app/node_modules/react-16-bootstrap-date-picker/lib'

EDIT: Ok, yarn add create-react-class seems to fix it, but I'm less than thrilled about adding extra yarn/npm dependencies when it simply needs updating.

@maxaggedon
Copy link

maxaggedon commented Dec 18, 2017

So do I. My current workaround was to fork the repo, make create-react-class a non-dev dependency and install it from github. If you want to use it as well, you can just put this in your package.json:

"react-bootstrap-date-picker": "github:maxaggedon/react-bootstrap-date-picker",

@DaemonAlchemist
Copy link

The create-react-class dependency has been updated, and republished to the react-16-bootstrap-date-picker package. @pushtell, it would still be helpful to get the main package updated so we don't need to maintain this fork.

@seriousManual
Copy link

+1

@1st8
Copy link

1st8 commented Jan 29, 2018

In case you want to get rid of the create-react-class dependency entirely, feel free to use the fork where I prepared #151.

package.json: "react-bootstrap-date-picker": "github:mixxt/react-bootstrap-date-picker",.

Cheers 🍻

@krazyjakee
Copy link

@1st8 warning: The datepicker is not showing in this branch when you click the element. It seems to have bad styling and also opacity is permanently zero.

@1st8
Copy link

1st8 commented Feb 19, 2018

@krazyjakee That's odd, are you sure it is related to my changes?
I agree the styling is not great (probably because we're on a older bootstrap version), but I think it has always been like this:

bildschirmfoto 2018-02-19 um 13 02 09

Would you mind to continue in my PR? #151

@TheThor59
Copy link

@1st8 @krazyjakee I used another guy's git that, I think, is the same solution that @1st8 provided. ("react-bootstrap-date-picker": "github:maxaggedon/react-bootstrap-date-picker") I had the same issue that the data is not showing after selection.

My solution : provide the selected value got from event onChange to the value props of the DatePicker

onChange(value: string, formattedValue: string): void { this.setState({currentValue: value}); }

<DatePicker onChange={ this.onChange } value={ this.state.currentValue } />

All works for me fine !

@thmsrth
Copy link

thmsrth commented Apr 3, 2018

Is there any update on this one?

@krazyjakee
Copy link

krazyjakee commented Jul 1, 2018

@bagermen if you're desperate, fork your own and reference it in your package.json. You could even create a pull request to this repository and help everyone.

EDIT: He deleted his comment.

@IzaGz
Copy link

IzaGz commented Jul 10, 2018

Hello i tried to use react-16-bootstrap-date-picker but got this
`

[email protected] requires a peer of create-react-class@^15.5.2 but none was installed.
npm WARN [email protected] requires a peer of react-bootstrap@^0.31.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^15.5.4 but none was installed.
npm WARN [email protected] requires a peer of react-bootstrap@^0.31.0 but none was installed.

`

@1st8
Copy link

1st8 commented Jul 10, 2018

Can you try using

"react-bootstrap-date-picker": "https://github.com/mixxt/react-bootstrap-date-picker.git#e535f478106c74bc03369d7a0cdfa943a97976ef",

in your package.json instead?

@orwell1984
Copy link

Hi @pushtell, is this project being maintained?

@orwell1984
Copy link

@DaemonAlchemist - do you mind enabling Issues on your fork?
I'd be willing to make some PRs to clean up.

Can someone advice as to why Error: Cannot find module 'react-bootstrap/lib/Button comes up? With react-bootstrap installed?

@DaemonAlchemist
Copy link

@orwell1984, I don't mind at all. Issues should be enabled now.

@blakecooper
Copy link

Can someone advice as to why Error: Cannot find module 'react-bootstrap/lib/Button comes up? With react-bootstrap installed?

In my installation there's no '/lib' in the path... it's just 'react-bootstrap/Button'. Same for all the other bootstrap components.

@LordA98
Copy link

LordA98 commented Nov 19, 2020

@blakecooper Did you solve this? I've got exactly the same error.

@blakecooper
Copy link

@LordA98 I think I ended up using this implementation instead: https://www.npmjs.com/package/react-datepicker

@LordA98
Copy link

LordA98 commented Nov 20, 2020

@blakecooper Yep, me too! Thanks for replying.

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

No branches or pull requests