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

TypeError: Object(...) is not a function #1025

Closed
sanggonlee opened this issue May 5, 2019 · 14 comments
Closed

TypeError: Object(...) is not a function #1025

sanggonlee opened this issue May 5, 2019 · 14 comments

Comments

@sanggonlee
Copy link

Environment

Tech Version
@material-ui/pickers 3.0.0-beta.1
material-ui 3.9.3
React 16.8.0
Browser Chrome 73
Peer library 2.0.0-alpha.27

Steps to reproduce

  1. Simply try to import from this library, e.g. import { MuiPickersUtilsProvider } from '@material-ui/pickers';

Expected behavior

Nothing should happen by just importing

Actual behavior

Getting this error
Screen Shot 2019-05-04 at 8 10 02 PM

I have a feeling this might be something on my end rather than a bug, since it's such a basic case and no one seems to have reported, but I'm following the install instruction exactly and really can't figure out what I could be possibly doing wrong.

@dmtrKovalenko
Copy link
Member

dmtrKovalenko commented May 5, 2019

Please update also material-ui to beta.1. It is required

@dmtrKovalenko
Copy link
Member

Or use material-you-pickers 2.2.4. We moved from the old repo to this one

@jmmccota
Copy link

jmmccota commented May 5, 2019

@dmtrKovalenko I'm using beta.1 and I'm having the same issue.

@dmtrKovalenko
Copy link
Member

Can you then make a reproduction on codesandbox?

@jmmccota
Copy link

jmmccota commented May 5, 2019

Can you then make a reproduction on codesandbox?

https://stackblitz.com/edit/react-zyiuzz

@dmtrKovalenko
Copy link
Member

@jmmccota You are using material-ui 3.9.2. For @material-ui/pickers required material-ui v4

@jmmccota
Copy link

jmmccota commented May 5, 2019

@dmtrKovalenko very interesting.... After change worked. I think the same issue occur for @sanggonlee.

Where mention is made in the documentation of the need to use material 4 or superior?

@dmtrKovalenko
Copy link
Member

In ReadMe, release notes and upgrading to v3 guide. We moved to new bpm packages 3 days ago

@sanggonlee
Copy link
Author

Can confirm it works after upgrading material-ui. Thank you.

@cdunkel
Copy link

cdunkel commented May 16, 2019

So at this point is there no way to use the last table v2 release?

EDIT: Sorry, I missed this: https://www.npmjs.com/package/material-ui-pickers

@nickperkinslondon
Copy link

You should mention requiring material-ui v4 more prominently.
I am a new user, so I didn't read the release notes or the upgrade guide ( and material-ui v4 is still beta ).
I spent about half an hour on this and very nearly gave up.
Just sayin'

@dmtrKovalenko
Copy link
Member

Material ui v4 is already released

@cdunkel
Copy link

cdunkel commented May 29, 2019

I agree with @nickperkinslondon. Even noting that Material UI v4 is required in the README and having a quick link back to the old material-ui-pickers repo for those that don't want to be forced into an update would save a lot of headache. As is this issue is the first place that I found it mentioned that v4 was required.

It also doesn't help the confusion that the page for the latest version of material-ui-pickers is linked to directly from the v3.9.0 Material UI pickers docs, which seems like a strong endorsement that the linked version would work with Material UI v3.9.0.

I'd be happy to make a PR for the Readme change, if that would be supported.

@kingeric027
Copy link

I am getting this error from my DatePicker component:
"Type '{ renderDay: (day: MaterialUiPickersDate, selected: MaterialUiPickersDate, dayInCurrentMonth: boolean) => Element; value: Moment; variant: "static"; onChange: (day: MaterialUiPickersDate) => void; ... 9 more ...; rowsMax: undefined; }' is missing the following properties from type 'Pick<PureDateInputProps, "ref" | "label" | "select" | "style" | "title" | "className" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | ... 265 more ... | "inputVariant">': color, size"

Everything worked on Material-ui/core 4.5.1 but I upgraded to 4.8.3 and started receiving this error. Here are the versions of my relevant packages:
"@date-io/date-fns": "^1.3.11"
"@date-io/moment": "1.3"
"@material-ui/core": "^4.8.3"
"@material-ui/icons": "4.5.1"
"@material-ui/pickers": "3.2.7"
Any idea what I am doing wrong here?

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

6 participants